Post

4 followers Follow
0
Avatar

?ERROR handling

Hi

I am looking for some help in handling error conditions. I have a field that contains the result of a division calculation, say 'Engineering budget remaining' by 'Engineering budget'. If no Engineering budget was allocated (ie. the value was 0), the result produced is understandably '?ERROR'. I am trying to tidy the output by returning something else other than '?ERROR' (nulling the field maybe?) and have tried using conditional statements but they fail the syntax check or result in 'unexpected type' messages so obviously I am missing something.

Any help would be appreciated.

Thank you.

Adrian Rowley Answered

Please sign in to leave a comment.

3 comments

0
Avatar

You typically get an ?ERROR if you try to divide by 0, similar to any spreadsheet application. You can use an IF statement to tell the system if a denominator field equals zero, then Null the field instead of trying to calculate it.

Josh Santos 0 votes
Comment actions Permalink
1
Avatar

I have this same issue but the fields that I'm working with are currency fields. When I try to use the solution mentioned by Josh, I get an error that <,>, <>, and = cannot be used with currencies. Ideas on how to get around this? Checking for "Null" doesn't work since a user can enter "0".

Emily Spencer 1 vote
Comment actions Permalink
0
Avatar

Same issue here... the below item is returning ?ERROR when TaskAssignment is Null

$CapacityOfUserMonthly.LoadForMonthly.LinkObject.TaskAssignment/$CapacityOfUserMonthly.Capacity)*100

How re-write it including the IF to avoid the ?ERROR ?

Filipe Araújo 0 votes
Comment actions Permalink