Friends, I’m going to share an intermediate tip (if we want to rate it by difficulty level; neither too hard nor too easy) since it requires some knowledge about actions.
The idea is to add multiple rows instead of just one when saving a form.
Let’s suppose there is a "Table 1" that contains records used as a reference in another "Table 3," where, when we enter, we can add records by selecting values from a dropdown list as usual.
Now, let’s suppose we have a "Table 2," and we are in it. We need to add a number "n" of rows to "Table 3," which has a Ref field to Table 2, with preloaded values, instead of adding them one by one from "Table 3."
A Yes/No column called "editing" with "reset on edit" enabled and an initial value set to an IF condition:
An EnumList column with a Base Type of Ref pointing to "Table 1" with "reset on edit" enabled. Let’s call it "Table 1 EnumList."
Table 1[id]
(or a filtered list if needed).Assign it to any column (a virtual column exclusively for actions is recommended, with the formula ""
).
The action should be "go to another view within this app" with the formula:
LINKTOROW(
[_THISROW],
"Newly Created Form"
)
This action redirects the user to a form where they see this row and the EnumList with labels from Table 1 (which can even appear as initial values).
Execute an action on a set of rows
Set values of some columns in this row
[editing] = false
Go to another view within this app
Use the expression:
LINKTOFILTEREDVIEW("Table 3", [Table 2 Ref Value] = [_THISROW])
Group these actions in a new action named ACTION 5.
Add a new row to another table using values from this row
Assign [Table 2 Ref value]
as:
ANY(FILTER("Table 2", [editing] = true))
Copy the rest of the fields as needed.
Finally, go back to Action 1 and configure it to execute Action 4.
With this setup, when saving the form, the grouped actions will execute, adding multiple rows to another table in the desired quantity.
Hope this tip helps! It may not be super advanced, but it will definitely save you time.