I have 2 tables: Employees and Events. Event has a reference to Employee (1:1). What I want to achieve is to be able to select single Event and clone it with reference to the each of the Employee that user selects. I was trying to do it in many ways and nothing works. My blocker is that INPUT() cannot be used for action "add new row to another table...".
Anyone had similar case?
Solved! Go to Solution.
The easiest way, of course, is to simply have the user create a new row and assign the Employee to each need row added. But that is clumsy and time consuming.
To do it more efficiently, you need to be able to loop over your chosen list of Employees and add a new row for each choice. To do that you will need:
1) Add a column to allow multi-select from Employees to get the chosen list
2) Setup a set of actions to control and perform the looping.
In your use case, the idea is to choose a list of Employees and the Event. Tap Save and then the actions pick off an Employee from the list, create a row in your desired table with that Employee and Event, adjust the list (either removing the Employee or bumping an index) and then repeat.
There are several posts in the Tips and Tricks on looping. It's actually easy once you understand the concept.
Below are a couple posts to get started, there are others so feel free to search. I'm certain you will have questions, so come back to the Community with your specific questions when you run into issues.
https://www.googlecloudcommunity.com/gc/Tips-Tricks/Looping-with-actions/m-p/223708#M75
https://www.googlecloudcommunity.com/gc/Tips-Tricks/Looping-with-Actions-Sample-App-BUILD-Video/m-p/...
I hope this helps!
User | Count |
---|---|
36 | |
9 | |
3 | |
3 | |
2 |