News blog

What is Servoy?

Getting Started

Comparison Servoy/VFP




Code Reference


VFP2Servoy Toolkit



Contact / feedback















IIF() - if..else

Returns one of two values depending on the value of a logical expression. Although Javascript does not have an immediate if statement it is possible to achieve the same effect by writing an if..else on one line.


VFP code example

? IIF(i = 7, "Value of i is 7", "Value of i is NOT 7")


Servoy code exampleple

if(i==7){cString="Value of i is 7"}else{cString="Value of i is NOT 7"}

// alternatively:

var cString=globals.IIF(i==7, "Value of i is 7", "Value of i is NOT 7");

Note: IIF() is a function of the VFP2Servoy Toolkit



External resources:


vfp plugin


ServoyWorld 2012 pics


Official Servoy website


Ken Levy on Servoy


Servoy info


Servoy Forum


Servoy Documentation © 2010-2012 • All rights reserved • Contact: