Re: Wierd Question Set User Selection Programmatically
Hi Maurice and R.Justus
Unfortunately "Set user selection" does not allow multiple selection criteria. When you wish to use a listing (not a range of data), the only method I can think of is to use a multitude of statements combined by 'OR'.
As you can't use brackets, you also need to be careful about the sequence of selections as 'AND' will preceed 'OR' and you may need to repeat user selections (be careful when you copy as you need to confirm each selection criterium by manualy reselecting!)
It is also my believe that the And/Or indicator refers to the previous line not the current.
Can somebody confirm whether the correct statement is:
Set User Selection(BC Date - Terminated (F060116), <Greater Than or Equal To>, RV Beginning Date, <And>)
Set User Selection(BC Date - Terminated (F060116), <Less Than or Equal To>, RV Ending Date, <None>)
or
Set User Selection(BC Date - Terminated (F060116), <Greater Than or Equal To>, RV Beginning Date, <None>)
Set User Selection(BC Date - Terminated (F060116), <Less Than or Equal To>, RV Ending Date, <And>)
Also when using a multitude of nested statements, I have had occasions where the selection criteria are incorrectly executed. Does somebody have similar experiences?
Two last comments that may help:
* Don't forget to call system function "Set Selection Append Flag" = NO
* If the data selection gets too complex you can always insert an 'if statement' in the Do section, which does allow multiple criteria:
eg:
If BC xxxxxx is equal to <literal list of values>
Further ER
else
Suppress Section write
Endif
This will slow down the data selection, but ensures a correct outcome
Good Luck,
Sef