Hello,
Is it possible to loop through each record in a scrolling window and run the change script for a field? The basic use case is to allow the user to mark multiple deposits on the Select Bank Transactions window (Scrolling window Reconcile_Scroll on window CM_Reconcile_Selected_Docs of form CM_Reconcile). It seems possible as Microsoft has the standard solution to begin and end a range and then click the Mark button, but I don't know the correct syntax for this. I added a button to the form and have a basic testing script like this:
~~~~~~~~~~~~~~~
range clear table CM_Unreconciled_TEMP;
clear table CM_Unreconciled_TEMP;
'Marked' of table CM_Unreconciled_TEMP = false;
range start table CM_Unreconciled_TEMP;
fill table CM_Unreconciled_TEMP;
'Marked' of table CM_Unreconciled_TEMP = false;
range end table CM_Unreconciled_TEMP;
change first table CM_Unreconciled_TEMP;
while err(table CM_Unreconciled_TEMP) = OKAY do
trxDate = 'TRX Date' of table CM_Unreconciled_TEMP;
trxNum = 'CM Trx Number' of table CM_Unreconciled_TEMP;
set 'Marked' of table CM_Unreconciled_TEMP to true;
save table CM_Unreconciled_TEMP;
// RUN CHANGE SCRIPT FOR '(L) Trx Marked' of window Reconcile_Scroll of form CM_Reconcile
'Marked' of table CM_Unreconciled_TEMP = false;
'TRX Date' of table CM_Unreconciled_TEMP = trxDate;
'CM Trx Number' of table CM_Unreconciled_TEMP = trxNum;
change next table CM_Unreconciled_TEMP;
end while;
~~~~~~~~~~~~~~~
Thank you.