Basic Syntax

If statements


The If statement enables you to insert a branch in your control sequence. Depending on this condition one or another sequence of statements will be executed.

When the If statement is used in a property formula or the record selection formula, then an Else branch should be included always so that the formula returns the correct return value type.

Usage:

If (condition) Then
		(statement)
Else
		(statement)
End If
If (condition) Then
		(statement)
ElseIf (condition) Then
		(statement)
Else
		(statement)
End If

Examples:

If {Orders.quantity}>100 Then
		formula = {Products.price} * 0.89
Else
		formula = {Products.price}
End If
Dim forecolor as String
Dim backcolor as String

If PageNumber = 1 Then
	forecolor = "red"
	backcolor = "blue"
Else
	forecolor = "black"
	backcolor = "white"
End If

formula = forecolor + " and " + backcolor

i-net software strives to provide accurate product documentation. Please give us your feedback using the form below.
NOTE: This form is for documentation feedback only. For technical assistance, please send an email to crystalclear@inetsoftware.de.

This page is: very poor very good
Comment: