Over the years I have had quite a few customers ask me how to use the user setup and form queries. It's not so much the initial setup that is the issue, but how to distribute changes and setup to other users? And how can we move our changes from our development or test environment to production?
The answers lie in the secrets of the SysLastValue table.
SysLastValue is a kernel-level table that does not show up in the AOT data dictionary. There is however a form called "Usage Data" that can be accessed (check tools / development tools / application objects / usage data). The form itself is called "SysLastValue" (yeah, really) in the AOT. We can use the datasource on the form to right/click and table browse this mysterious table.
SysLastValue stores many different things. The majority of records you will find in there pertain to caching, or "last use" type of data, which will remember the last values you've entered on a dialog, the last printer selection you made for a report, etc. But, which is why we're interested, it will also store any user setup you make on a form, and any and all queries being stored. The field "recordtype" will indicate exactly the type of values stored.
We are interested in type "UserSetup" with the "isKernel" flag set to no, these are the user setups on forms, and the "elementName" field will tell you what form name.
Type "UserSetupQuery" contains the queries saved for a form. You will notice the "designname" contains the form's name, and the "elementname" field contains "f:formname".
So there we are. All the building blocks to build a little tool to distribute user setup and form queries among users, and even migrate between environments, or take backups before clicking "usage data" on the user options.
We have build our own little tool for this and actually taken it a step further. For more information on our IntelliMorph tool called "Personalization Center", check our company website at www.streamlinesys.com