Statements>If-Else-Endif
Introduction Installation Beginning Admin Quick Ref FTP Server SMTP Server Database Security
Statements Objects String Parsing Events Queues Samples Special names Error Handling Accessories   Back
Caravan Business Server>Help>Statements>If-Else-Endif
Syntax
The If-else-endif construct can be used in Caravan script as follows.
<caravan>
if  <condition>
</caravan>
.....
<caravan>
endif
</caravan>
If . . . endif

You can place If statements inside of other conditional statements. You must end all If statements with EndIf or you will get an error
message in caravan business server screen.
Text Decision structures in Caravan script are created using If-endif and if-else-endif conditional statements. You can test conditions and then, depending on the results of that test, perform different operation. The condition is usually a comparison, but it can be any expression that evaluates to a value.
Sample
<HTML>
<BODY>
<caravan>
          var temp
          temp(val)="1"
          if temp(val)="1"
           "You can place any code you desire here"
          endif
</caravan>
</BODY>
</HTML>
Quick Reference
Properties Nested If Else Endif
Home       Back