Validation check to select a value only once for that particular week

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 Solved
0 4 303
1 ACCEPTED 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)

View solution in original post

4 REPLIES 4

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

Top Labels in this Space