Hi,
I have been getting trouble finding a solution that would fit for my scenario. I am currently creating a basic app that would help us send reminders to our employees for their Annual Physical Examinations.
The app mostly revolves in 3 tables, which are as follows:
1. tblemployees - this holds all of the employee details
2. tblschedule - this holds the details of the schedule (it also contains a list where we select employees based on the birth month selected on the form when initiating the schedule).
3. tblempscheds - this should hold the the details for the employees about their schedule.
When a schedule is created using the form for tblschedule, all selected employees with the same birth month selected, should be added inside the tblempscheds (as this will trigger the bot for the emails notifications)
This is how the form looks like:
I tried following the Looping with actions, however it does not work and my app gets stuck for a reason.
Here is the action to create the items on the tblempsched
The form save is using the Repeater action, then I was hoping that this would formula would loop all selected employees all the way: COUNT([Related tblempsched]) < [Count of Employees].
Any advise on how can I go over this? or any similar scenario I could base of from. Appreciate the help.
Solved! Go to Solution.
You can use Start: & End together with SELECT() when adding rows with the webhook. It looks something like this (from an existing Bot). Yours will be more simple..
{
"Action": "Add",
"Properties": {
"Locale": "fi-FI",
"Location": "60.494915, 22.090139",
"Timezone": "E. Europe Standard Time",
"UserSettings": {
"Restaurant": "<<ANY(_Per User Settings[Restaurant])>>"
},
},
"Rows": [
<<Start:SELECT(Ingredients[ID],AND([RestaurantID]=ANY(_Per User Settings[Restaurant]),[RecipeID]=MID([_THISROW].[ID],1,LEN([_THISROW].[ID])-2)))>>
{
"ID": "<<LEFT([RestaurantID].[Restaurant],3)&"_"&UNIQUEID()>>",
"RestaurantID": "<<ANY(_Per User Settings[Restaurant])>>",
"RecipeID": "<<[_THISROW].[ID]>>",
"MaterialID": "<<[MaterialID]>>",
"Quantity": "<<[Quantity]>>",
"Unit": "<<[Unit]>>",
"Notes": "<<[Notes]>>",
}
<<End>>
]
}
User | Count |
---|---|
36 | |
8 | |
3 | |
2 | |
2 |