Screenshots at the bottom:
-
My goal: I want my loop step to properly pull in the data from the previous step
-
Issue: The loop step is seemingly pulling in the proper count of items in the array from the parse_csv step but for some reasons sets the everything to null when they are clearly NOT null.
-
initially my loop step was not directly after the parse_csv step so i brought it to be directly after it. also tried using python, same issues.
Hi there @Shmuel_Palgon,
So from what I can see you're loop is triggering a function you created in your workflow, right?
If so, I don't see you passing any parameter for the function. You can
- Click on "Edit function"
- Add a parameter, e.g. row
- Go back to the loop block and within the row parameter to pass you can write {{ value }} which for each iteration will pass each row.
If I misunderstood your set up it would be great if you can share a screenshot of your function.
Hey Miguel,
Appreciate the reply! In my loop block you can see that the input for the loop is from the previous step titled "parse_csv" β does it not automatically bring the data in via the input?
If in fact the input does not actually bring in the data that is referenced in the input field, would I need to create a parameter for ever single column header as seen in the parse_csv step (like what is shown below?
Truly appreciate your guidance β‘Μ
Hey @Shmuel_Palgon,
So, your loop block is calling a function but your not passing (yet) any data with your function. You just need to add one parameter with {{ value }} in it. this will pass an object for each iteration. E.g. from your screenshot yo usee an array with 2 objects, so the loop will run twice, one for each object. But you need to pass the object.
See below screenshot from one of my workflows:
The first block returns an array with 58 objects. You can see I run the loop and by referencing to each line as value I can define what data each loop should use. In your case as you're passing the whole object you can only use {{ value }}
1 Like
Hey @MiguelOrtiz β thanks again! I recorded this loom showing the function and what it is designed to do. Hopefully this give context to the problem!
Loom:
If you're willing to hop on a 5 min google meet that would be absolutely wonderful
Hey,
Sure. So from what I see, you're almost there:
- send {{ value }} as parameter in the loop block
- In your function blocks, you need to change
value.invoice
to params.invoice.[key]
(e.g. params.invoice.invoice
)
Let me know if this doesn't make it and I'm happy to jump into a google meet, send it to me via DM
Likewise! You definitely know your stuff and hope to work with you 
1 Like