2 Replies Latest reply on Oct 8, 2010 6:59 AM by miw

    Scripts:  Script does its job but I cannot get it to show number of errors in a Dialog box.

    miw

      Title

      Scripts:  Script does its job but I cannot get it to show number of errors in a Dialog box.

      Post

      I wrote a script to count the number of blank occurences for a field in a set of records.  The script works (it's main goal is to identify those exception records) but I would like it to accumulate the count of the exceptions for a dialog box (which I thought would be simplier than actually writing the script for finding those exceptions).  I bet I am missing something simple but I can't figure it out.  Here is my script:

      Set Variable [$CountEmpty; Value:IsEmpty (Invoices:InvoiceID)]

      Show All Records

      Go To Record/Request/Page [First]

      Loop

      If [IsEmpty ((Invoices:InvoiceID)]

      Go to Record/Request/Page [Next;Exit after last]

      Else

      Omit Record

      End If

      End Loop

      if [$countEmpty > 0]

      Show Custom Dialog ["Error";"Count of exception records: " & $CountEmpty]

      Go To Layout ["Exceptions" (Country)]

      Else

      Show Custom Dialog ["No Errors found"]

      End If

      I know the script works in identifying the exception records as I can get the list of them in my "Exceptions" layout noted above.  What I can't get is the count of the exception to show in the Dialog Box (noted in red text above).  No matter how many record exceptions there are, the dialog box always shows just a "1".