Passing currentItem (field in table column) value into query as variable.

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets, and reproduction steps)

Here I have pulled the relevant budgets from the tables and sum’ed. Now I want to query an API, one of the JSON payload variables is the campaign name to be sent as label. I want the API Query (getCampaignCosts) to pass from each row the campaign name variable to return the totalCosts specific to the campaign name in each row.

Relevant links:

Hello @cbrock.

There is current no way of doing a variable amount of page queries. It is possible to pass all the campaigns to the query through $queries.getBugets.data. We recommend that you create a batch API to make a single request instead of having to iterate over every row.

Hi there,

So the end result needs to be the value from totalCost which is returned from an API call setup in queries. That api call is unique to each campaign name.

There’s no way to pass the campaign name from the currentItem into a query/API call?

You can try using our HTTP Fetcher component, but it does not have credentials configuration and should only be used for public APIs

That’s what I’ve used, but the body of the API payload requires the “campaignName” to be passed from each row. So in the query I create a variable $campaignName and then at the cell level of the data table I pass the value of campianName into the query and variable of $campaignName.

I think the best solution here would be to have the API work in batches of campaign name instead of one for each row. It’s not possible to create queries for each row individually.