Hi all,
I was trying to substitute infinite values of a certain column using the expression reported by @AlexanderFillbrunn in this thread.
Unfortunately it seems that in my case the expression doesn’t work because the Math Formula node gives me the following error:
Hi @AlexanderFillbrunn, thank you for your quick reply and help!
I realised that the problem was just because I was using a flow_variable in the expression instead of the column name. This is why I was having that “Unrecognized symbol Infinity” error. Correcting that, your expression works fine to remove infinity!!
I have another question though: to me its seems that your expression evaluates to “undefined” when you have an infinite value on the reference column. The problem is that the part on the left of the + become undefined in that case:
Hi,
You are right. You could get around this by “cheating” and making use of the fact that in the background the Math Formula is still Java. So something like this could also work:
Hi Alexander,
Thank you for your answer. I’m sorry to insist, but perhaps this thread will be useful also to other people in the future.
In the attached example workflow I tried to apply the Math Formula node using this expression as you suggested:
isInfinite($result$) == 1 ? 0 : $result$
But it gives me the following error:
Invalid settings: Unable to parse m_expression Syntax error
Did I misunderstand anything?
I’ve also tried to pass the expression to the node as a flow variable but it gives me the same error.
Hi,
It was a mistake on my side. It does work with the String Manipulation node, but not with Math Formula. As @Daniel_Weikert mentioned, the Column Expression is the way to go.
Kind regards,
Alexander