find mode in loop condation
I have two tables (Company and Query)
I am trying to know how many Quires the Companies have made.
The following script works only with one company. It shows the number of calls a company has made.
Set Error Capture [On]
Go to Layout ["Company Calls" (Company)]
Set Variable [$ComID: Value:Company::CompanyID]
Go to Layout ["Query" (Query)]
Enter Find Mode
Set Field [Query::fk_CompanyID; $ComID]
Set Field [Company::Company all Calls; Get ( FoundCount)]
Go to Layout ["Company Calls" (Company)
As I have 60 companies or more. How Can I get the result of all on one click ( how to put it in loop).
Please let me know if more detail are need it.
I appreciate your help.