Function block parameters not found in loops

Hi all,

I’m still running into the issue where function block parameters are “not found” when calling a multi-step function inside a loop. It looks very similar to what others reported here:

In my case:

  • The loop calls a multi-step function with parameters like {{ value.someField }}.
  • After editing or changing function parameters, the loop often breaks and shows “parameter not found.”
  • Recreating the loop or workflow sometimes fixes it, but not consistently.

I’ve attached screenshots of my (minimal) setup. Has anyone found a reliable workaround, or is there an official fix planned?


EDIT: I've recreated the multi-step function and the new one works. Nothing changed..

I've currently duplicated the function BY HAND because simply using the duplicate function obviously copies the error in it. Hopefully we can tackle this issue and fix it :slight_smile:

Hi @devopser, does this only occur when using the function within a loop block? What happens if you test the function or you create a function block and pass in similar inputs?

Just wanted to follow up that I was able to reproduce this on my end. I personally found it specifically occurred with the loop block and that the function itself worked fine otherwise. Hopefully we can get a fix for it!

Hey Mike,

Apologies for the late answer. You are correct, outside of the loop block the function itself worked fine.

I have also exported (json) both situations just to check if there are any discrepancies, but couldn't find anything.

Hopefully you can track the bug in the source code. Do please keep me updated because I am very curious :slight_smile:

1 Like

I'm having exactly the same issue. The function works correctly but the loop won't run it and gives this error: Error evaluating ProcessBatchesUI: Iteration 0 failed: "Function block parameter 322afddc-b293-401c-9850-bd2fe1e648f2 not found"

If you have skip errors in the loop, it just runs through the iterations and does nothing.

I tried duplicating the function, and I deleted all parameters and recreated, but that doesn't work either.

Assuming the fix is to recreate the function by hand?

Deleting and recreating the loop block resolved the issue for me.

4 Likes

I’m also having this same issue – workaround of creating a new loop step and then adding the existing multi-step function to it worked

1 Like

Thank you for reporting that work around @closedplum :+1:

I just added more +1s to the ticket for you and Duncan.

Hoping to get this fixed, will update the thread with any news I hear on the ticket :saluting_face:

it’s crazy this happened, do we have a root cause / know that this won’t happen randomly again? Took me the whole afternoon to find this solution…

Hi @Tim_Lee,

I was working with our engineering team and it seems to be related to Loop Blocks, I would for the time being advise working without loop blocks and instead using for loops inside of code blocks while we work on fixing this.

It seems that loop blocks can very easily get into a corrupted state where they need to be rebuilt when incorrectly giving an error. I will add your +1 to this ticket and keep this thread updated with any news I hear from the engineering team.

Hope I’m not introducing a completely different issue here but, I am experiencing what I think is this. It hard to tell if it is or if its just the linter constantly failing. I find the workflows environment constantly sufferers from the linter just no longer reporting or suggesting stuff. In my case though, I dropped in a code block and simply returned the entire params block. It returned an empty object. Just started making a new function and I am noticing the params block sort of come and goes. I switch to a different view and come back, sometimes it seems like the params properties go MIA again.

In my case(this mat not be related to the tread issue) I noticed referencing a configuration variable as test data in my params block test inputs was casing the block to sometimes go missing. I removed the config variable references and the params block happily propagated down the line.

@Jack_T I just confirmed, I do also experience this exact same thing when creating a new loop block that’s driving a function. iterations fail, but running the function from a loop within a code block succeeds. I have loop blocks in other workflows that were created awhile ago and I have not seen any issues with them. This must only be with creating new loop blocks or maybe with new functions?