Workflow breaks after removing loop parameter (Function block parameter not found)

This seems to be the same problem mentioned here.

https://community.retool.com/t/multi-step-function-parameters-not-found/55608/5

I think I found the way to reproduce the error, and a quicker solution than what was on the thread I found while researching the bug.

Steps to reproduce:

  1. Create a loop step in your workflow with parameters
  2. Map values to parameters on the loop step
  3. Edit the loop function, and remove one of the parameters with a value mapped
  4. Re-run the flow, and you'll get the "Function block parameter not found" error on the metadata of the loop step.

What's happening:
When the parameter is removed from the loop, it gets removed from the loop's function block, but not the loop block itself. This causes an error at runtime.

Another way to fix the problem
The other thread about this talked about rebuilding the entire loop step. I think this is faster and easier than that solution, especially if you're talking about multi-step loops.

  1. From the ellipsis menu in the upper right corner, export the workflow to JSON
  2. Open the JSON file, and find the block in $.blockData that matches the loop object. Find the key under options.functionParameters that matches the ID from your error message. Remove this key and value.
  3. Save the JSON file.
  4. From the ellipsis menu in the upper right corner of the workflow, import your modified JSON file.

If, like me, you removed more than one parameter, you may need to do this several times until you get rid of all the missing parameters from the loop block. The error message that I found unfortunately only shows the first missing parameter's ID.

2 Likes

Thank you @nevesjon, you just saved me about 3 hours of rebuilding a multi-step loop :melting_face:

Hi @nevesjon,

Apologies for the confusion around this and thank you so much for this detailed write up and steps to reproduce!

I can bring this to the attention of our workflows engineering team so they can give this some attention and hopefully they will be able to streamline the process of being able to remove params from multistep function loops so there is less friction in this area and no unexpected errors popping up :raised_hands:

Thank you so much! However, this should DEFINITELY Be fixed by the @Retool_Moderator team

1 Like

Hi folks, the ticket has gotten a status update so things are in motion.

The ticket is now ready for work and just needs to be picked up by an engineer.

Thank you for the patience!