www.icetips.com  Icetips Utilities Documentation 5/15/2016    

Icetips: Preserve variable data

Previous  Top  Next  


This template uses the INI Manager class to get and put data from the selected variables - can be application variables or database variables to set defaults for certain fields.  Note that it only works at procedure level.  The code executes as part of the WindowManager.Init and WindowManager.Kill to restore and save the values.  It also works in Source procedures, where the read is put at priority 1 and the write is put at priority 9999. An optional condition can be specified for both restore and save.  The default INI Manager class will store the data either in an INI file or in the Registry depending on the application settings you have.

 

By default the data is stored using the variable name in the INI section specified in the template window below.  By using the "Append to Entry in INI" option for the variable, you can add some text to it, if there are chances that it might create a duplicate entry in the INI file or Registry. 

 

Template_PreserveVariables

Simply add the variables you want to store.

 

INI SectionThe [SECTION] in the INI file or the KEY in the registry to put the value(s) in.  This uses the Procedure name as default.

 

 

Template_PreserveVariablesVariable

 

VariableSelect the variable you want to use.  The variable must exist in the local data or in module or global data or from a data file.

 

Condition IF...This allows you to set a condition expression that will be evaluated using an IF statement.  You can select variables or type in a condition.

 

Apply condition on ReadSpecifies if the condition should be applied when Reading the data. 

 

Apply condition on WriteSpecifies if the condition should be applied when Writing the data.

 

Append To Entry in INIThis is an optional string that you can enter that will be appended to the entry in the INI file.  By

 

 

Each variable has it's own embeds, before and after it is assigned, where you can possibly prime the variable with a value right before it is saved, or do something with it after it is read.

 

Template_PreserveVariablesEmbeds

 

This results in this generated code:

 

Template_PreserveVariablesEmbedsCode

 

If the PEO:LastName had "-AppendToEntry" entered in the "Append To Entry in INI" field, the generated code would look like this:

 

Template_PreserveVariablesEmbedsCode_WithAppend

 

 



Direct link to this page: http://www.icetips.com/manuals/utilities/itpreservevariabledata.htm