Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Lookups and setting values using IF statement

Glen Collins
Contributor
September 22, 2021

Hello. I was able to figure out my issues with the lookup and set value and now something has changed for me and I need to redo it. So if a value exists in a dataset, I need to set the value using the existing field I'm basing the search on. But I'm having issues formulating the IF statement so it'll set the value correctly.

Field3=(IF(EMPTY("[entry.SupportAnswer]"),([BeginDate.timestamp.add(61200000)]),([BeginDate.timestamp.add(111600000)])))

So if the lookup is not found in the dataset add 17 hours to the date/time. If it is found in the dataset then add 31 hours to the date/time.

I've tried removing/adding brackets and braces, Moving those around and adding and removing quotes. I still get the error below(in various forms)

com.udojava.evalex.Expression$ExpressionException: Unknown operator '[' at position 16

Is is capable of being done? That's just where I left off. Still trying to do it though hoping to stumble across it.

Thanks.

Glen

1 answer

1 accepted

0 votes
Answer accepted
Glen Collins
Contributor
September 22, 2021

While I was able to work-around this issue to get my project working again, it would be nice to know if specifying a variable instead of a static value is possible.

I know it's very configurable but without seeing a sample it's kind of hard to determine how to formulate the function properly. All the samples I see in the wiki use static values and not values from fields or whatever.

Thanks.

Glen

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events