Executes a block of commands if the condition evaluates to true.
Condition evaluated in the If.
Block that is executed if the cond condition evaluates to true.
Block that is executed if the cond condition evaluates to false.
Objects: Procedure, Transaction, Web Panel, Work Panel, Panel Work With for Smart Devices
Java, RPG, Cobol, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)
The If command allows you to condition the execution of command blocks.
Any command can be defined within block1 and block2 respectively.
If &del //&del is a boolean variable
DelCustomer(CustomerId) //DelClient is a Procedure and CustomerId is an attribute (with value in that context) sent by parameter
When using this command in a Panel object or a Work With for Smart Devices object there is a restriction for the cond syntax. It can only contain a variable, attribute or SDT element of Boolean data type to be evaluated.