Dear Community,
I have a “Leave type” field where the Users are supposed to select option, “Weekly Off” only once for that particular week.
I am trying to use count, weeknum and few other functions but couldn’t achieve this.
Pls help.
Thank you.
Solved! Go to Solution.
Hi @Kanha_PM_Office,
You may wish to try the following approach. This will work with weekdays defined as WEEKNUM() expression in AppSheet ( I believe Sunday to Saturday)
Please create a VC called say [LeaveCheck] with expression something like
CONCATENATE([Employee Name],"-", WEEKNUM([Leave Date]),"-",YEAR([Leave Date]))
Now in the leave type column’s valid if constraint, you may have an expression something like
IF([Leave Type]=“Weekly Off”, NOT(IN([LeaveCheck], SELECT(Customers[LeaveCheck], NOT(IN([Primary Key], LIST([_THISROW].[Primary Key])))))), TRUE)
Hi @Kanha_PM_Office,
You may wish to try the following approach. This will work with weekdays defined as WEEKNUM() expression in AppSheet ( I believe Sunday to Saturday)
Please create a VC called say [LeaveCheck] with expression something like
CONCATENATE([Employee Name],"-", WEEKNUM([Leave Date]),"-",YEAR([Leave Date]))
Now in the leave type column’s valid if constraint, you may have an expression something like
IF([Leave Type]=“Weekly Off”, NOT(IN([LeaveCheck], SELECT(Customers[LeaveCheck], NOT(IN([Primary Key], LIST([_THISROW].[Primary Key])))))), TRUE)
Thank you @Suvrutt_Gurjar
As we now have the EOWEEK() expression you could use USEREMAIL()&EOWEEK(TODAY()) as a key column. Though I don’t know if you can use it as a key column… just an idea.
Nice suggestion for the use of the new EOWEEK() expression @Aleksi
User | Count |
---|---|
44 | |
29 | |
22 | |
20 | |
14 |