Skip to main content

Testing against a variable inside an IF function

Hi Guys,

Has anyone found the solution to create an IF-function within IDEA to test something against a variable?

To be more precise, I was hoping to create a new field, which gives me the text "EMAIL" if the variable {JobDepartment} is defined as "EMAIL" or to give me the value in the column [JOB].

I have tried the below equation, but this one does not seem to work unfortunatelly:

Dim JobDepartment As String
JobDepartment = "EMAIL"

field.Equation = "@If(" & JobDepartment & " = ""EMAIL""; ""EMAIL""; JOB)"

I'm rerunning this script to test the completion of a set of trainings, whereas most a Job or Department related, but 1 is related to a whether a team member has his/her own e-mail account.
Many thanks!
Anton

Brian Element Fri, 07/31/2026 - 19:36

Hi Anton,

I assume that you are creating a field and this equation is placing the values in the new field.

How I am reading the equiation is that it first checks if the field EMAIL contains EMAIL or EMAIL = "EMAIL", if it does then the new fields will contatin the text "EMAIL", if not it will contain the contents from the field JOB.

Is this the logic you are looking for?

Let me know.

Brian