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)
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.
If you have a Core subscription, one way and simple way is to do this with Bot/webhook as you can use Start: & End expression with it. That will create a loop automatically.
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]>>”,
}
<>
]
}
I think you need to activate the Appsheet API for this case,
I am aware that according to the following, you need Enterprise plans to use the Appseet API, but is the Appsheet API also available for Core plans?