March 20, 201213 yr I have a little record -creation script set up in part of my solution that involves a little pop-up window with several Global fields on it that the User fills in before hitting a "Create" button that triggers my script, which goes to the relevant layout, enters data in the various fields, then goes to a different sub-table and creates some records there before going back, clearing most of the globals and heading back to the original screen. It works fine. EXCEPT, bizarrely, if the User leaves a field called ARCHIVE_gl empty. In this case, the script runs as usual, and *mostly* works . . . but a few of the global fields seem to get 'Emptied out' temporarily along the way. Attached is a picture of the first chunk of the script. The first field that 'fails' is the Project title field that gets filled with the Globals::zzz_GrantStatusNew_gl (just above the Script Debugger progress arrow). Viewing the globals in the Data Viewer, I discovered that when the Script executes the "Go To Layout [X_RAWgrants" (Grants)] " step. the GLobal field gets cleared out in the Data Viewer. If I cancel the script and go back to the layout with the GLobal fields on it - - - the field is still displaying the original value!!! Can anyone suggest what might be going on? I do have a Relationship in the TO this layout on that uses the Global Archive field that seems to be the root of the problem -- but (a) I can't see why the other Global fields wouldn't be affected similarly -- and at any rate, I thought that Global values persisted in a database regardless of Layout and context? What could cause a change of Layout to clear a Global field . . . temporarily?
March 20, 201213 yr Hi Wickerman I can't be certain how your globals, grants and deliverables tables are related without seeing your relationship graph When your script switches layouts from x_Rawgrants (grants) to x_rawDeliverables (deliverables), it is likely that Globals::zzzGrantStatusNew_gl does not have a direct relationship with deliverables and therefor will not appear on the Current Tab of the data viewer. Try adding it to the watch tab and check it's value after your script has switched layouts HTH Brian
March 20, 201213 yr Author omigosh -- sure enough, I didn't have the field set to Global storage. I am humiliated. My eye was draw to the uniform _gl strings at the end of my Fieldnames and read that as confirmation that they were global fields, rather than seeing the field options column. sorry for wasting your time. is there a forum where I can advertise for a new brain?
Create an account or sign in to comment