Ignore Node if error

Hello,

I am trying ignore the output from 2 nodes if it results in error. In the below screenshot, 2 of the Math Formula nodes are erroring out due to missing inputs, is there a way to ignore the output from those in the Concatenate.

image

Thanks in advance.

Hi @N904808,

i think you are looking for the try/catch nodes

In the catch Part i would then feed an empty table in the expected structure with the table creator node

8 Likes

Hi @N904808 , you can’t really “ignore” the output of nodes, especially if you end up using a Concatenate node at the end. If you define 4 input ports for the Concatenate nodes, it will expect 4 inputs. It will never allow you to run otherwise. Try to concatenate only 3 tables with a 4 input Concatenate for example, it will not allow you to run.

So, you need to at least return an empty table - maybe that’s what you meant by “ignore”. So, that means you do have to do something, you need to return an empty table.

You can do this using the Try Catch that @AnotherFraudUser suggested. If you’re not familiar with Try Catch, basically you set the Try before the operation, and Catch will trigger if there is an error, where you can intervene and handle what to do in case of the error - that’s where you’d create an empty table or something.

Another approach would be to validate your data before going into the Math Formula, and make sure you have valid values to work with. There is also some condition you can do within the Math Formula with the if(x,y,z) function, so you can check if some condition is not met, you can just return 0.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.