Add multiple Rows based on Form submit

Hi, I am looking for help regarding adding multiple rows on submission of One Form.
In forms, I have a multi-select choice option, wherein if submitted, creates multiple rows based on how many option submitted

E.g. Name of Product: Product A and in State choice: I select, State A and State B, then it should add Two rows with

  1. Product A State A
  2. Product A State B

Is this possible?

Yes, possible.

Questions:

  • are you using a native form or a custom form? (this would be quite easy with a custom form, but could be a little tricky with a native form)
  • what is the maximum number or rows that might need to be added?

If there are only a handful of permutations, then probably the simplest approach would be a custom action with a number of conditional branches, each adding a different number of rows. However, that wouldn’t scale very well. So if there is a large or indeterminable number of permutations then a better approach is using webhook → Make → Glide API.

2 Likes

Rightnow, I am just determining if these things are possible or not in Glide. So yes, I will go with Custom Form option, if it is possible.

Not more than 10 in each form submission.

Can you please explain more on this? interested to know how it works.

Do you thing if this can be done without Make? or Make is required anyway.

Well, just going back to your earlier example:

Your choice component will write a comma separated list of values to a user specific column. You can use a split text column to create an array from that, and then use a rollup on the array to count the number of items. This will tell you how many rows need to be added. So then in your custom action, you would have something like:

  • If rows equals 1
    – Add Row
  • If rows equals 2
    – Add Row
    – Add Row
  • If rows equals 3
    – Add Row
    – Add Row
    – Add row
  • etc…

You can see how that can get quite cumbersome and difficult to maintain as the number of rows to be added increases. That’s where Make → API can be a better option. You would send a webhook to Make with whatever data is required, and then use Make to add the appropriate number of rows via the API.

2 Likes

Thank you for this. Great approach.
However, my question on this, how will I add that specific “State” to each of this new Row? I mean, the values will comma separated or the array, how will I specify that, in that particular add row, first selection should be added and next row, second selection should be added?

You’ll probably need to use something like a series of Single Value columns to pick each item from the array.

1 Like

Thank you @Darren_Murphy for your quick help as always. I will try your suggestions once.

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