7 14 RDML NOTCONDITION

LANSA Web Functions

7.14 <RDML NOTCONDITION>

Syntax:

<RDML NOTCONDITION="<field>" VALUE="<value>">

</RDML>

 

Description:

These tags are used by LANSA to determine if the lines encapsulated by these tags should be sent to the browser or not.

These tags allow you to programmatically set the contents of a field depending on certain logical conditions.

The <field> can be:

  • A field in your LANSA function.
  • A system variable.
  • A reserved keyword.

If the field, <field>, does not exist or the contents of the field is blank or zero, then the lines are sent to the browser, provided the <value> parameter is not specified.

The  <value> parameter is optional. If the <value> is specified, then the lines are only sent to the browser if the current field value does not match the value parameter.

There are reserved <field> values. These are special instructions for LANSA Web functions. These are:

  • &DEBUG

Check if batch debugging is enabled in the initial URL request. If it is, the subsequent URL is modified to include the BDEBUG keyword before the request is submitted.

  • &TASK

Check if a task identifier is specified in the initial URL request. If it is, the subsequent URL is modified to include the TASK_ID keyword and the task identifier before the request is submitted.

  • &USETMPFLD<index>

This is an instruction to check the HTML working fields identified by <index>. The <RDML SETTMPFLD> tag is used to set the values of these working fields. This specialized field is used to retrieve a particular working field. Do not use this keyword if you do not understand this description!

 

 

If the field is numeric and fieldname does not exist or the value is "0", then the lines encapsulated by the tags ARE sent to the browser.

If the field is alpha and fieldname does not exist or the value is "0" or is blank, then the lines encapsulated by the tags ARE sent to the browser.

Consider the following example:

<RDML NOTCONDITION="DISCOUNT">

   <h2>You do not have a discount.</h2>

</RDML> 

If the field DISCOUNT does not exist, then the user will see the message.

Let the DISCOUNT field be numeric. If in the RDML function the DISCOUNT field is 0, then the HTML will be used and the message will be displayed to the user. When the discount is not zero, the user will not see the message.

Let the DISCOUNT field be alpha. If in the RDML function the DISCOUNT field is blank, then the HTML will be used and the message will be displayed to the user. If the discount is "50 percent", then the user will not see the discount message displayed.