Example: Using a Requirements Element for Roles

In this example, the code refers to three roles: AVAR, BYVAR, and FVAR. The user must assign a variable to at least one of these roles in order for the task to run. If no variables are assigned to any of these roles, the SAS code cannot be generated, and the task will not run.
      <Role maxVars="0" minVars="1" name="AVAR" nlsKey="AVARKey"
         order="true" type="A">Analysis variables<Role>
      <Role maxVars="0" minVars="1" name="BYVAR" nlsKey="BYVARKey"
         order="true" type="A">Group analysis by<Role>
      <Role maxVars="0" minVars="1" name="FVAR" nlsKey="FVARKey"
         order="true" type="N">Frequency count<Role>

   <Requirement condition="$AVAR.size() &gt; 0 || $BYVAR.size() &gt; 0
      || $FVAR.size() &gt; 0">
         <Message>At least one variable must be assigned to the Analysis
         variables role, the Group analysis by role, or the Frequency
         count role.</Message>