Back to forum list… Back to How Do I?...

If Else (1 reply)

Ben W
4 years ago
Ben W 4 years ago

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

Support
4 years ago
Support 4 years ago

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

Contact

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Request Demo

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Access Downloads

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close