Create multiple rows v2.26.0

Creating rows with the Data+ Table usually requires a reload of the app. This can be a bit tedious if several rows are added in quick succession.
There are a few tricks to simplify this process for the user. In this example, we will use Data+ Flow.
Server
- Create an API Key, that allows updates for the desired table
Table
- We will not use the
Create DB entryoption of the table - Add a custom button to start the process (Settings->General->Table Styling->Info bar->Custom buttons)

- The
DialogoptionInputwill allow the user to enter the desired rows - Create a rule with trigger
Custom buttonand aSend Data+ messageaction, this allows us to communicate with theFlowextension - The actions parameters can be used to send the user input

- Leave the Function value empty for now and close the rule editor
Flow
- Add a
Data+ Flowextension to the sheet - Change the trigger section by disabling
On Initand instead enableUse Data+ Message

- Open up the
Floweditor (you can use the edit button inside the extension object while in edit mode) - Add an
Iterateblock inFormode ranging from 1 to [stepData][Parameter 1(Trigger)]- The trigger parameters are the values that will be send with the
Data+ message

- The trigger parameters are the values that will be send with the
- Add the
DB Writeblock to the Loop part- Select your table and insert your API-Key
- Other column values could be prefilled here as well

- Finally add a
Reloadblock to refresh the app and load the new rows from the Data+ database

Table
- Back in the
rule editorof the Table the function input should suggest the correctData+ messagefunction name

That is the basic setup, that allows creating multiple rows at once. Some further thoughts:
- It is probably a good idea to validate the user input before execution (the rule conditions can be used for that)
- Add some loading feedback for the user (e.g.
Loading overlayrule action) - Change the background of the
Flowextension so it not visible in view mode - We are using the auto generated id by the database, mapping the rows to another table is best done in a separate column
Last updated on