This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hey guys,
I've noticed that when AMP is turned on, the Multi-Field formula tool shows 'Divide by 0' as an error message rather than a warning
It does however still pass records through the tool.
Normal formula tools report Divide by 0 as a warning, and when AMP is turned off the tool reports it as a warning too
Is this expected behaviour? And if it is, can it be changed? I have workflows which are set to cancel on error and I wouldn't expect them to stop due to denominator zeros...
Ollie
IMO division by zero should be an error. I prefer to have an IIF() statement checking for zero and returning NULL() when the denominator is zero. This is better than having warnings.
i also respect that there are existing workflows that need to be refactored. There is an advisory statement that AMP should be tested on existing workflows prior to being turned on.
I'll tag @TonyaS for her visibility to your concern.
cheers,
Mark
Hi @OllieClarke,
That's very interesting - I've never seen that before! Maybe something to be submitted as a product improvement...
As a stop gap, you could have a Test tool or Message tool produce an error if the divide doesn't work (i.e. produces a null value) - that way the cancel on error still works!
-Alex
This may be a stupid question, but why not eliminate both the errors and warnings by using an IF statement?
@dYoast a combination of laziness and stubbornness
@alexnajm thanks for the reply. In this case though I don't want the error from the divide by 0 to stop the workflow, so it's the other way round :)
@OllieClarke apologies for the misread!
Hello @OllieClarke , thank you for bringing it to our attention. I personally value consistent behavior and I will approach this as a defect and add to our bucket.
Thanks @harsh_alang