Items in Array to separate row in another table

Back again!

I read relevant posts to my problem below, but have not had these methods work

Problem:
I want a lookup/query/relationship/formula (I don’t know what the preferred method is) to extract Array column values in ‘table 1’ cell and create ‘table 2’ rows.

Table 1 Array column snip:
Context here - Each row is a receipt. Each receipt is unique and identifiable to a user & rowID

Table 2 Desired outcome (SUPPORT NEEDED):
Create a row for every array item. For example ‘Unie Sauce Chili’ should be a row & ‘Green Lentils’ should be a row, and so on. Once all items are in a separate row then the next receipt will begin filling rows. all items will be related back to a receipt in table 1 and the rowID.

Let me know how I can kickstart this process, cheers!

1 Like

How did you populate the array in table 1 in the first place?

Screen Shot 2024-06-18 at 18.30.42

So the item_name column is a JSON query?

Yes item_name is JSON query

Does it have to be a JSON query for this to work though? Going back a further step, how was the original JSON created? This eventually will lead you to a situation where you have to use the Glide API/Call API action to add mutliple rows, so I have to make sure I understand how it’s created in the first place.

Currently: Scanned Receipt (image)>AI>JSON>JSON query.

Is the Glide API/Call API action to add multiple rows simpler?


They are the only ways to do that for now.

Please have a watch here.

I will give this a try!

1 Like

This video is helpful, but as a follow up:

I have a glide maker subscription and do not have access to the glide API being used. I cannot rationalize getting an upgrade just for API access. is there an alternative method, or integration to externally do this?

1 Like

But when we have array? How to do it?
array

So you want to display them as different rows in another table? Or do you want to do something else?

Each array position into new line in another table.

If you only need them for temporary use, please do this.

If not, please describe your case more so we can follow.

We’re trying to do something similar.
The user enters a quote request in a table and lists the items in the quote using a choice component. Ideally We’d then like to automatically list the individual items in separate rows in another table so we can put specific feedback against each item. So we’d end up with a table of items, not unique rows just per item but unique rows per item per quote.

Any ideas?

With webhook triggers and loops, you can do it like this, as an on-submit action:

  • Add a webhook workflow, copy the webhook URL.
  • Add an on-submit action, use a trigger webhook action and send over the rowID of the quote request, and the comma-delimited list of items.
  • Use two query steps to query the request ID and the items list from the body of webhook payload.
  • Use a split text module to split the list of items.
  • Loop through that, and add them to your helper table of items, with the same request ID for each row.

Thanks, we’ll give it a go.