@ti16 and others follow my solution without using back-end workflows.
I think I can improve and maybe improve performance, but at first it hasn’t presented me with an error so far.
Solution:
On my create class screen, I created an active WF by clicking on the Save button.
Actions: Create an item in the Class table, then I used a custom states to search for students with a constrain = the team in which he participates, after that moment I opened a small Popup informing that the class is being created, along with an animation. Then I paused for 6 seconds and then closed the popups and cleaned the inputs.
In parallel create another WF that occurs every 0.3 seconds, but it only starts through a rule, in this rule I determined the following:
When the custom states have more than one record, this WF will be triggered, I configured it this way because the custom states are only created after saving the class, that is, if the user does not want to save this WF, it does not happen.
Then it iterates because there is a list of students and it saves item by item, then I take the created record and make changes to it, informing the team about it, in the final step I set the custom states and made a rule to clean it up this list, even make the record not duplicate, in the value field I did:
I set the custom states:minus item and the last record made, I did this for both the students and the team, so it performs the actions, the loop and eliminates the records.
I’m not sure if this is the best way, but at the moment it was the one I found to solve my problem and without using the back-end that at the moment my plan is free.
Credits: People I learned from and I think are worth mentioning, thanks for sharing the knowledge!
@renatoasse @artemzheg @keith David Rocha - Rede No Code.