If Condition
Click If Condition on the SYSTEM ribbon panel to display the If Condition window. Read more: Command Syntax |
It is recommended that you read this topic through in it's entirety (and optionally the IF script syntax topic). If you study this topic, along with the sample script provided, you should be well on your way in using this command. Should you still find that you are in deep waters without a paddle, then don't fret! There is a dedicated area of the support forum for custom report scripting issues.
Please note that the RowNumber field is shared among all loops at this time. If you have nested loops, RowNumber will be correct for the outside loop before the nested loop, but not afterwards; it will change to be correct for the nested loop, and thus corrupt the outside version. To work around this, if you need the row number after the nested loop then simply use VARIABLE_FIELD to save it to a variable that you can use later.
To learn more about the features of this window, glance down the table below or highlight the control you are interested in by clicking on the screenshot above.
What is an IF Condition?
For those of you who are not familiar with the concept of IF then here follows my attempt at teaching you! It allows you to introduce conditional processing in your scripts. For example:
Here, we have placed all the script commands related to the Chairman inside an IF condition. This way, the chairman value (and "Chairman:" text) will only display on the report if there is anything to display. This will happen at certain times during the theocratic year, for example, when assemblies and conventions are held. The uses of the IF command are virtually endless and it is up to you to determine how best to use the features provided. I have attempted to show you a variety of examples in a new sample script which you should find installed with the application. Please read the help topic about using sample scripts if required. |
Negate the result (true <---> false)
This option may require some explaining. It introduces the keyword NOT at the start of the criteria. Let me try and explain with an example:
This IF command would cause all subsequent details to display in red if the talk number was 1000. |
Here, we used the negate setting. This time, subsequent details are shown in red if the talk number is not 1000. |
Usually you would use this facility as some kind of else clause in your scripting. Thus you don't have to make two IF commands, each equal but with logically opposite criteria. For example, the example with the Negate option set as illustrated is logically equivalent to an IF statement with the Negate option clear and with the condition “Talk Number” ISNOT “1000”. The Negate option is particularly useful if you have several criteria and you want to ensure the exact logically opposite set of criteria. OK, that was as clear as mud wasn't it!
Here you will see listed all of your chosen criteria parameters. You can have more than one set of criteria. However you should understand that when you do use more than one set of criteria, that all criteria must be satisfied for the IF command to be considered true.
The criteria facility works in a similar way to that used for theLOOP command. See the Editing Criteria help topic.
The criteria facility works in a similar way to that used for theLOOP command. See the Grouping Criteria help topics.