If Else (1 reply)
Yes, so what you have at the moment is an inline If statement (hence the name IIf).
If you want to have multiple if conditions then you're half way there!
You just need to declare a variable to store the result.
----
Dim Result If %Repairer = "Non Retail Restricted" Then Result = 1 ElseIf %Repairer = "New Value" Then Result = 2 Else Result = 0 End If Result
----
Or you could use a switch statement
----
Dim Result Select Case %Repairer Case "Non Retail Restricted" Result = 1 Case "New Value" Result = 2 Case Else Result = 0 End Select Result
I’m looking to set some values based on an if else.
We have this setup at the moment for “IsRepairer”:
Iif(%Repairer = "Non Retail Restricted", 1, 0)
We need to add an extra level in, so I guess it would be:
If %Repairer = ‘Non Retail Restricted’ value = 1
Else if %Repairer = “New Value” value = 2
Else 0