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.
Here is the second article which will be available after Wednesday 19th
This is a practical example with source code you can review.
Regards
David
Here is the first of two articles on the technique I developed.
https://winthropdc.wordpress.com/2022/01/17/gppt-iterating-through-a-dexterity-scrolling-window/
Enjoy
David
Yes. It is possible but needs some complex techniques.
I only recently worked out how to do it after over 25 years of working with Dexterity.
I will blog the techniques soon on http://WinthropDC.com/Blog
Regards
David
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156