Add rows with the same information

Hi Community!!
It's me again :frowning:

I have a question, is there a way to add different rows with the same information on click a only button?

I have these tables
image

And in my App:

Now, what I want is that when you click the button "Add+", appears another DataCell where you can choose from the picklist.
And when you click the Button "Done", it adds the two rows with different Number but the same Day and Hour.

Hi @Hern-ec53, happy to help! :slightly_smiling_face:

Yes, you can write multiple rows to a table or different tables by adding another action to the automation:

For your case, you can also specify in the run options, to only add another row if the additional data cell has a selection (is not blank). This is how it would look:

Here's a screen with two fields for users to select an option and a screen variable which will be used for hiding or showing the second selection field. I set the initial value to FALSE as shown:

The visibility of the block with the second selection is set to the value of that variable:

The Add button updates the value of that variable to TRUE if clicked (to display the second selection):

I also added a remove button, which does the opposite (sets it to FALSE):

Now you can set up your automation to write a row for the first selection, and then conditionally write a row for the second selection, if it is not blank:

=$[Selection2]<>""

Hope this helps, and let us know if you have any other questions! :honeybee: :honey_pot:

Hi @Alyssa !!
I used the configuration that you shared me. But, the problem is if I want to add, for example, 15 rows with the same information.
I want to find a way to do that without using 15 blocks.

Hi @Hern-ec53 :honeybee:

Got it, thanks for further describing what you're looking for. Yes, the method I've shown in my previous reply could be used if you just have one additional or a few additional data cells.

For adding several more as you've described, I'd suggest having another button on the screen that allows you to submit and either add another selection (this would reset the selection field) or exit the form. This is how it would look:

Here's a screen with a selection field, other input fields, and two buttons. The first button allows the user to submit and add another, which adds a row to the table and then resets only the selection field on the screen to be blank (the other input data remains on the screen):

The second button adds a row to the table and then exits the form by navigating to another screen (such as a Home screen):

Hope this suggestion helps! :slight_smile: :honey_pot:

That works!! Thenk you very much! :blush: :blush:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.