Trying to help someone troubleshoot a failing procedure I’ve come across a scenario that makes no sense to me so far.
He has a procedure that calls another and ends with all records selected - which is wrong.
RemoveAllSummaries
SelectAll
Field Date SortUp
Field Name GroupUp
Field “BalDue” FormulaFill Fee-Paid
Field “BalDue” RunningTotal
Call “.find owed”
.find owed:
Local lvOwes
arrayselectedbuild lvOwes,¶,“”,?(info(“Summary”) = 1 and BalDue ≠ 0,Name,“”)
Clipboard = lvOwes
Select arraycontains(lvOwes,Name,¶)
OutLineLevel “1”
The Clipboard (which I’ve added for feedback) shows the correct list of names, but that’s not what it selects. BUT, if I combine the two procedures, eliminating the call, it works without fail:
RemoveAllSummaries
SelectAll
Field Date SortUp
Field Name GroupUp
Field “BalDue” FormulaFill Fee-Paid
Field “BalDue” RunningTotal
Local lvOwes
arrayselectedbuild lvOwes,¶,“”,?(info(“Summary”) = 1 and BalDue ≠ 0,Name,“”)
Clipboard = lvOwes
Select arraycontains(lvOwes,Name,¶)
OutLineLevel “1”
I can also run just the called procedure after a failure and then it makes the correct selection. There are no values being passed from one to the other, no other databases being involved so why would the selection fail only if called?