Set up action using data from a previous completed action

Hello!

Let’s say I have a set of 2 actions triggered by a tap on a submit button.

  1. The first action creates a new row in table A.
  2. The second action creates also a new row in table B.

The trick is I’d like to write the row ID of the row created in the table A in a column of the row I’ll create in table B.

Is there any way to get the output data of the previous actions?

For now, the only workaround I’ve found is to externalize the creations of rows in Glide tables with Zapier using the action ‘Trigger a webhook’ but it’s not scalable enough.

Thanks for your help!

For the record, I’ve just read this post: 🆕 Call API: call any API securely and return data back to your app instantly - #25 by Petko_Delchev

And it might help me in some cases but not always, parsing output data from previous actions will be much better.

If you use a native form, an on-submit action would enable you to get the rowID of the record in table A to add a new row in table B.

If you use a custom form, set a unique value in a user-specific column, bring it over to the record in table A. Create a relation using that unique value, pull back the rowID in table A, use a wait condition to make sure that rowID lookup is not empty, and then add a new row to table B, before clearing all temporary values.

1 Like

Thanks for your reply!
I still don’t get how I can get the rowID of the record created in table A right after step 1 ‘Create a new record in table A’ is complete. When I click on the second step ‘Create a new record in table B’ to set it up, I can’t see in the options available the data returned (if data is returned after a step completion) of the record I just created in table A, including its rowID.

I’m trying to dig the ‘Call API’ column type option but there’s no filter to whether decide to call it or not, I don’t see how this could be relevant for my issue (and since there’s no endpoint to get one record or filter out records, it’s even harder to find a workaround).

How are you adding the record in table A?

I use Glide’s actions.

When I click on a button, it triggers the action.
First step is ‘add a row’ in a table A followed by a second step ‘add a row’ in table B.

Using a form can create on submit would create the record in table A and triggers another action. But in this case, I’d have only one step ‘add a row’ in table B but no data pulled from the row created in table A thanks to the user interaction with the submit button. Or maybe I’m missing something here, that’s what I’m trying to figure it out :slight_smile:

So what info are you adding to table A? It’s not from any user inputs in a form?

I’m realizing I’m wrong with my previous post saying that filling up a form and triggering a Glide’s action won’t help me filling the row I’m creating in another table with the rowID of the table A’s record. It sure does as the data returned is everything from the created row on submit.

Where I’m struggling with in Glide actions is when you need to pass the data from one table to the others after creating a row on submit and push data from it in existing rows in other tables.
I tried to summarize my issue with the most basic example but obviously, adding a row to a table including data from another created on submit is straight-forward.

What’s impossible to me is to pass the data from a created record on submit to existing records in other tables.

Sorry for the confusion, I’ll stick to real use-cases next time I ask for help.

Yes, that’s correct, providing you’re using a native form. You will get the full info from the row you just submitted, so you can add more info to table B from the row you created in table A.

For “other tables”, you can create relations/queries from the record you just created in table A to reference it in the “add row” call for table B, or somehow bring those values to the user profiles table, then you can reference it anywhere.

You can’t do it, but it’s basic functionality that all automation software has, so it’s ridiculous it’s not a feature.