1 Reply Latest reply on Jan 14, 2015 7:50 AM by philmodjunk

    (FoundCount) after multiple Finds

    amtrakpdx

      Title

      (FoundCount) after multiple Finds

      Post

      Wizards,
      I’m performing a series of three Finds within a script.  I’m interested in the number of found records from the third Find.  I was advised to use ‘Get(FoundCount)’.  I’m not getting the results I’m expecting and am now wondering; Does (FoundCount) reset itself to the ‘last’ number of found records?  If (FoundCount) calculates to zero will the value be zero or null?
      TIA

        • 1. Re: (FoundCount) after multiple Finds
          philmodjunk

          Get (FoundCount) returns the number of records in the current layout's found set at the moment it evaluates. This will be the moment the script step that uses it is executed or, in a stored calculation field, the moment that the field is first defined. In a stored calculation field, there will be nothing in this expression to trigger it to re-evaluate if Get ( FoundCount ) is the only term in the calculation. Thus, if you need to put it in a calculation field--this is not often needed--you make it an unstored calculation field.

          Please note that you can also use the insert menu to put a "layout symbol" on your layout that automatically displays the current found count without using any field, variable or calculation.

          If your find or other found set affecting action produces an empty found set, Get ( FoundCount ) returns 0, but this is something of a non-issue in most cases as a null value result, if used in a larger calculation will evaluate the same as a zero result in nearly all cases.