December 12, 20187 yr I work a lot with multiple windows open on the same Record. Something that is driving me mad right now is; I have a Field open in one Window and I try to edit the same Record in another Window. But of course I get the Record Locked message. Because I have multiple Windows open I have to go clicking through all my open Windows to release the Record - which is very irritating. I thought of making a Script containing the Commit command which I could quickly run with a Command-[Number] keystroke. But Commit only works on the frontmost window. Is there some workaround that would let me Commit the Record across all of it's open Windows?
December 12, 20187 yr I think you gave the answer yourself: Quote I have to go clicking through all my open Windows to release the Record - which is very irritating. The script would have to do the same thing (except the getting irritated part). And you would probably want to check that the record is the same one before committing it.
December 12, 20187 yr Author The number (and names) of open Windows are never the same - so a Script that steps through known Windows will not work. I was trying to think of something 'out of the box' - ie: use a Script Step not really intended for that purpose. I tried scripting switching from Preview Mode and back to Browse Mode but again that only works on the frontmost Window. Is there anything more systemwide?
December 12, 20187 yr 1 hour ago, wjmartin said: The number (and names) of open Windows are never the same - so a Script that steps through known Windows will not work. But a script that steps through the windows listed by the WindowNames() function ...
December 12, 20187 yr Author Thanks for the response. Not asking you to write a Script for me but... could you give me an overview of how to implement this? WindowNames is not a Script step so I am not sure how to implement this.
December 12, 20187 yr Off the top of my head, I imagine it could look something like (untested, pseudocode): Set Variable [ $recordID ; Get (RecordID) ] Set Variable [ $originalWindow ; Get (WindowName) ] Set Variable [ $openWindows ; WindowNames ("") ] Set Variable [ $n ; ValueCount ( $openWindows ) ] Loop Set Variable [ $i ; $i + 1 ] Exit Loop If [ $i > $n ] Select Window [ GetValue ( $openWindows ; $i ) ] If [ Get (RecordID) = $recordID and Get (RecordOpenState) = 2 ] Commit Records [] Exit Loop If [ 1 ] End If End Loop Select Window [ $originalWindow ]
Create an account or sign in to comment