Scripts: Script does its job but I cannot get it to show number of errors in a Dialog box.
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]
If [IsEmpty ((Invoices:InvoiceID)]
Go to Record/Request/Page [Next;Exit after last]
if [$countEmpty > 0]
Show Custom Dialog ["Error";"Count of exception records: " & $CountEmpty]
Go To Layout ["Exceptions" (Country)]
Show Custom Dialog ["No Errors found"]
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".