Hello all,
I have a employee early leaving app that allows employees to scan their ID and leave. Only authorised employees are able to leave and if they are not-authorised an error message is display (this is done by countrow of gallery used).
So the app has a simple barcode scanner and a gallery view which shows only authorised employees details(retrieved from Sharepoint list 1) and gives them option to signout, which again records back to another Sharepoint list 2.
Now for certain employees, I have to allow them only on certain days of week only ( say they can leave only on Monday and Thursday). In the sharepoint list 1, the day allowed is a choice column allowing multiple selections.
How would I validate if the employee is allowed on the app access day tobe allowed or not.
Thanks
Solved! Go to Solution.
Hi @HadiAbdul,
Do you want to check if the day the current user leaves is the allowed access day?
Could you please share a bit more about the scenario?
Firstly, you should determine if today is the allowed access day for the current user based on the SharePoint list1.
Set the OnSelect property of the submit button as below:
If(
!(Weekday(
Today(),
StartOfWeek.Monday
) in Concat(
LookUp(
Product,
Employee.Email = User().Email
).AccessDay,
Value,
","
)),
Notify(
"No access day found!",
Error
)
)
@HadiAbdul You have to filter your gallery further for records that have Today() in the days of week that they are allowed to leave.
Hi @HadiAbdul,
Do you want to check if the day the current user leaves is the allowed access day?
Could you please share a bit more about the scenario?
Firstly, you should determine if today is the allowed access day for the current user based on the SharePoint list1.
Set the OnSelect property of the submit button as below:
If(
!(Weekday(
Today(),
StartOfWeek.Monday
) in Concat(
LookUp(
Product,
Employee.Email = User().Email
).AccessDay,
Value,
","
)),
Notify(
"No access day found!",
Error
)
)
Thanks. this helped and I was able to clear by this logic code
User | Count |
---|---|
158 | |
99 | |
83 | |
77 | |
59 |
User | Count |
---|---|
195 | |
173 | |
103 | |
93 | |
89 |