Youâll have to combine the multiple bundles into a single bundle, so that they can be mapped in the same âCreate a Rowâ module fields.
If you need further assistance, please provide the following:
1. Screenshots of module fields and filters
Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what youâre looking at. You can upload images here using the Upload icon in the text editor.
2. Scenario blueprint
Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.
3. And most importantly, Input/Output bundles
Please provide the input and output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select âDownload input/output bundlesâ.
Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.
Following these steps will allow others to assist you here. Thanks!
@sehacencosasmx The approach youâre taking to solve the problem is wrong.
Because your integration is reading data from the array aggreagator one by one, and adding a new row for each collection in the array.
As i understand what you want to do is add the value to column B or column C based on the value ^XAGMXN or ^XAUMXN.
To avoid putting them on different rows, you need to check if the last row that has been filled has an empty column B or column C. If yes, then you use upate the row module to update only that column of the row. If No, then you use add a row to create a new row and fill the value.
A basic outline of the integration would be something like this:
You need to add a router after the parse csv module. Two path will be created from the router.
One path will check with a filter if the col1 value is equal to ^XAGMXN. Another path will check if the value is ^XAUMXN
If the value matches ^XAGMXN, you want to add it to the column C. So you need to check first if the last row that contains some data in google sheet has an empty value in column C. If the last row has an empty column C, you simply update the row filling that column. But if it doesnât have an empty value, it means you need add another row and fill the column.
The same approach goes for the second path of the router.
Now you may wonder how to find if the last row of a google sheet. You can use the search rows module of the google sheet and use a filter to check if the bundle number if equal to the total number of the bundles returned. That will be your last row. But this method may be a bit inefficient as it will need to iterate over all the bundles for each input.
A more efficient way would be to use Make data store where you save last the row number when you update or add a row.
Then you can simply get the row number from the data store and use it with the google sheet module. You may also need to modify the google sheet to add an index column so you can filter it based on the index number.
Iâve attached a screenshot of a scenario i created for you. It may be helpful for you to get the idea.
I ended up opting for a data store. I realized that I am going to need to combine data from another scenario so it was easier for me this way.
After getting the data from both scenarios, I created a 3rd scenario just with a module data store / get a record + add row google sheets and thatâs it.
Awesome to hear that you managed to come up with a simplified version of the scenario that caters to your needs.
Thanks for circling back to the community and sharing your final setup with the rest of us. This is super valuable and could be incredibly helpful to many others looking for a similar solution.
FYI: I marked your comment as a solution to keep the community organized and easy to look for answers.