Forum Discussion
jitpbi
Post Patron
6 years agoCalculate status
Hi, I need help to get the status of a field based on few conditions. The below is the sample data where "New Stats" is the required field: Output1 Output2 Status New Status 100 150...
- 6 years ago
jitpbi Try this:
New Status = VAR FirstOutput = Table[Output1] VAR SecondOutput = Table[Output2] VAR CurrentStatus = Table[Status] VAR Result = IF ( OR ( AND ( FirstOutput < 5, SecondOutput > 100 ), AND ( FirstOutput = 0, SecondOutput = 0 ) ), "Error", CurrentStatus ) RETURN Result
AntrikshSharma
Community Champion
6 years agojitpbi Try this:
New Status =
VAR FirstOutput = Table[Output1]
VAR SecondOutput = Table[Output2]
VAR CurrentStatus = Table[Status]
VAR Result =
IF (
OR (
AND ( FirstOutput < 5, SecondOutput > 100 ),
AND ( FirstOutput = 0, SecondOutput = 0 )
),
"Error",
CurrentStatus
)
RETURN
Result