How to write multiple rows to table?

I am building an app where I can select different items for equipment that we build, it will be used to help quote our builds. I have parent/child relations set up with some of the items in my sheet. How can I add the child items to my quote table when I add the parent? I have been using chatgpt to help me, it says to use “add multiple rows” but I dont have that option available anywhere. This is the first time using this app, so I am still learning. Any input is appreciated.

Hi,

There is no add multiple rows in Glide at the moment. But, you have multiple ways to achieve this :

  1. Use Bulk Insertion: Bulk insert from one table to another
    Here is an advanced tutorial for update bulk but works the same way for insertion by changing the action type: Bulk Edit Column Values Across Multiple Rows in Glide with User-Specific Column Compatibility
  2. Use a webhook workflow or a manual workflow to access the loop feature and add rows for each element you would have in a collection.

Let me know if you need more help!

Welcome to this wonderful community by the way!

Thank you. Im about to dive into that. Will both of those options work with a free account?

It won’t work on a free account because it either requires Call API or workflow automations, which can only be done on paid plans.

Is there a way to do it with a free account?

Nothing easy that I can think of. Do you have a fixed set of “template” children for each parent? Maybe you can get away with multiple add row steps, but that feels clunky.

Yes, I do.

Ive been trying to figure out the logic to do that.

What’s your flow looking like in your app right now?


Here is a screenshot of my current workflow. Also included a section of my data table so you can see where its pulling from.

So what does “CHILD COMP” mean in your flow?

For each quote added, you want to add some template items for that quote, is that correct?

Sorry, didnt copy all my data. I set that column up as a relation. It list all of the child items associated with that parent item.

My goal is to be able to pick what items add to my quote and it any item has child items it will add them automatically.

So there can be multiple items in a quote, and then all children items must be added to that quote as well?

Do you anticipate those children items be changed, for any fields, in the future?

That is correct. There will be multiple items added to quote. Yes, child items added to quote. I am basically build a materials list to quote equipment we build.

I dont see any of the fields changing, just adding/updating items.

I think you might be able to get away with storing the children items as a JSON object.

Is there any reason you have to get them into rows other than making the structure clean? Do you need to edit the items/children items in a quote after the first add?

No, there shouldn’t be any need to edit the items once they are added. The only reason I was trying to add a row is because thats all I knew how to do. As long as I can get the data in the quote table it shouldn’t matter how its accomplished.

If it isn’t too much for you to set up, and assuming children items are not edited for a quote, I would recommend this:

  • Add a JSON object column to your children table and construct a JSON that includes all relevant fields.
  • Add a multiple relations column in your quote table that relates to all children items.
  • Add a joined list column to join all related JSON objects, separated by a comma and a newline character.
  • Add a template column:
[
{joinedJSON}
]

With joinedJSON being the value from the step above, to make it a valid JSON array.

  • Add a childrenJSON text column, and on submit of any quotes, write the joinedJSON to childrenJSON to lock it in.

I’m not sure what further things you would do with childrenJSON so I leave it there.

I would suggest trying the Explorer plan when you get a chance. You have access to the Workflows on that plan to make this easier.

Thank you. I am going to read up on this and see what I can figure out.

1 Like