We have a request from a number of our clients regarding the use of Stored Settings.
A large number of our forms have lots of columns, and individual companies only require a subset of them (or want to move the position of some of them to the left so that they are seen without needing to use scrollbar).
Obviously this is where stored settings become very useful - one of the selling points of moving to Genero.
However, our customer's IT departments don't like the idea of individual users hiding table columns (which will be stored) only for someone else to use the same PC and panic because a column has 'disappeared' from the system - not all users understand the concept of hiding/showing columns !!!!!
My understanding is that if the GDC has stored settings disabled then any pre-existing stored settings are not retrieved from the client - the 'standard' settings will always be used.
Is it possible to change this behaviour, so that for example the IT department could
1. set up the client with stored settings enabled
2. go into relevant forms and set the 'company standard' form layout
3. disable stored settings on the client
4. client will now use the settings that were stored previously, but any subsequent changes will not be stored, so every time a form is opened up the 'company standard' layout is presented.
As a second request, they would like the ability to copy stored settings between clients - again as a company standard they may want certain form columns hidden and with over 200 separate PCs running the software it would be very time consuming to individually open up each client and get the settings stored.
Martin,
We had the issue you described when we rolled out a POS application nationwide. Head Office wanted to dictate the column settings that applied to a screen in the POS application for the 600+ POS lanes up/down the country.
The solution we hit upon involved using the import/export functions of regedit.
Head Office sets the columns up as they want, and then click a button that leads to the following code being executed ...
LET l_command = 'regedit /e "', l_filename, '" "',
'HKEY_CURRENT_USER\\Software\\Four J', ASCII(39), 's Development Tools\\GDC\\Forms\\Table Columns\\', l_formname,'.', l_screenrecord,'"'
CALL ui.Interface.FrontCall("standard","execute",[l_command,1],l_ok)
... This stores the registry settings in a .reg file on the network. Then when the POS programs are run they execute the following to import the registry settings from that .reg file. Then when the window is opened it uses those settings ...
LET l_filename = "../reg/", l_formname,"_",l_screenrecord,".reg"
LET l_command = 'regedit /s "', l_filename,'"'
CALL ui.Interface.FrontCall("standard","execute",[l_command,1],l_ok)
... The .reg file is stored and distributed in the same manner as the GDC images. The reg folder is at the same level as the pics folder in the GDC
The only trick in the whole process is you have to remember that the registry settings aren't written to the registry when the user moves them around on the screen but later when the user exists the window. So the head-office user has to change the screen to how they want it, exit the window, re-enter the window and then click the button to save the settings.
Also this is on Windows, but I am sure the method would work equally well with other platforms replacing regedit with the appropriate command.
Hope that helps,
Reuben