I’m trying to find the right solution for this use case.
Data about a company and its board members can be found by use of “call api” to a specific endpoint.
The resulting json has a structure like
– company_number : 100
----- Name: John Doe
----- Address: The earth
----- Name: Alex Johnson
----- Address: The moon
I would like to let the users manually add position to the board members - therefore I’m thinking of putting all the boardmembers into a new table like
| Name | Address | Position |
| John Doe | The earth | CEO |
| Alex Johnson | The moon | CFO |
I would then be able to show all the boardmembers in a collection (and filter by company_number)
When the Positions has been added to the boardmembers by the user then I expect that I would write all the data to new table with all boardmembers for all companies whereas the table shown above should be a helper table. But this is potentially just a bad idea that complicates the setup unnecessarily as I don’t really see an easy way to add multiple rows in a new table.
How would you solve such a case? Any ideas? Will I need to introduce Make.com (I would actually love to it all in Glide)
NB: this must be done (automated) for multiple companies
I think adding rows in a new table is the right approach.
The only way I can think of to do it solely in Glide requires using the Call API action.
Trigger the Call API action with the mutations.
If you don’t have access to Call API, probably Make.com is the way to go, with the same approach of creating multiple mutations (through an iteration) and then use a single HTTP module to add multiple rows.
@Darren_Murphy@ThinhDinh Thanks a lot for your input.
As you have done it before, Darren, would you be able do a small example to show how this is actually done? I think that it is a pattern that would be great for others to understand: Based on json data in one cell how can you create multiple rows in another table.
Here are a couple of Loom videos that I made a few months back. These demonstrate setting values in multiple rows, but the same technique can be applied to add rows.
The first video uses templates and joined lists. The second one uses the new JSON Columns.
I guess what isn’t covered in the above is how you would transform an API JSON response into something you could feed into the API call to add new rows. It’s kind difficult to show something generic for that as every situation will be slightly different.