title: Processing related csv files in Expression evaluator
body: <p>We are trying to use an expression evaluator with limited coding capabilities to perform database operations on several files. The code looks like the following:</p>
  
  <pre><code>For each Shift record in shifts table
      If shift.qualification matches 'qualification of user' in qualifications table THEN
         If shift.ward matches 'ward of user' in preferredWards table THEN
             If shift.StartTime does not match 'Booked shifts of user' in transaction table THEN
                  Print Shift.Id, Shift.Date, Shift.StartTime
             End IF
         End IF
      End IF
  Next
  </code></pre>
  
  <p>The above code works to the extent that it pulls all the records from the shifts table. There are two problems which we are unable to solve and need help with:</p>
  
  <ol>
  <li>We cannot limit the number or records printed (Framework does not permit break statements or loop counting variables)</li>
  <li>We cannot determine if the code printed nothing because none of the shift records meet the criteria</li>
  </ol>
  
  <p>Please note that this is a Framework-dependent problem and hence the limitations mentioned above cannot be overcome. It is not possible to do basic things like creating arrays, variables or breaking the for loop. </p>
  
  <p>This is a logic problem more than anything else and I was hoping someone could help come up with a logic that allows us to do the following:</p>
  
  <ol>
  <li>Get all the shift records that meet the conditions</li>
  <li>Limit the records to 10</li>
  <li>Somehow indicate if there are no records found with those conditions</li>
  </ol>
  
  <p>Appreciate any help I can get </p>