Hi @Dan_Bahir apologies for the delay, was an AL.
A good example is given above in the screen-shot. In this instance products that belong to a group have to meet a specific criteria. Once identified, a record is created in an intermediary table called: ProductGroup_Has_Member
These records need creating to maintain the many-to-many relationship between ProductGroup has many products and a Product can belong to many ProductGroups.
The trigger is saving the details of a ProductGroup which may have amended the criteria. Hence the start condition: Check | Product group members to add
In the detailed outline of this discussion is mentioned looping over a list of ‘something’ until that list has been processed. Since there is no LOOP construct in AppSheet, we have to make-do with Actions calling each other. The recursive actions are outlined again below:
- Loop Action | Create Product Group Member calls →
Add | First Product Group Member
Loop (repeater) Action | Create ProductGroup Member*
The action: Loop (repeater) Action | Create ProductGroup Member calls → Loop Action | Create Product Group Member hence creating the recursive loop.
But, as explained earlier, doing this on the client-side is too slow as it temporarily freezes the SAVE action, meaning the user has to wait for some of the processing to have been completed, before the using the app further.
Hence the question asked here: about placing this in a Bot, so it can be used server-side. Having tried most of the solutions outlined, still not found one that works without issues for maintaining a many-to-many relationship. Never got an answer from AppSheet as to what is the recommended approach for dealing with many-to-many relationships. I am sure there are lots of AppSheet community members who would like an answer to that question.