Websydian v6.1 online documentationOnline documentation - Websydian v6.1

Other Uses of the ParameterStore Pattern


Using the Parameter Store with Other Variables

By default, it is the contents of the local ParameterFields variable that will be saved in the Parameter Store and it is also to this variable that values from the store will be loaded.

It is possible to use the Parameter Store with additional variables, saving and loading the contents of those to the store.  This is done by calling the Services.SaveParameters and Services.LoadParameters meta-functions respectively.  Calls to either of the two functions must be specified within a +For Variable construct specifying the variable containing the fields to be saved or loaded.

Fields can be saved in and retrieved from the Parameter Store for any number of variables using the above functions, as long as the fields are retrieved to the same variable as they were stored from.

If using the Parameter Store with more than one variable in the same function, remember to blank to ParameterStoreWork<NameSpace> field.

Alternative Owners of Parameter Store

The Parameter Store can be owned by other entities than the Session entity as well as more than one Parameter Store may be specified in the same Websydian application.  In this way, a Parameter Store may be defined that is owned by the User and/or by the entire Application.

Example:

UserParameterStore is a FNC ParameterStore
replaces ENT
...by ENT
WebOwner
MyUserMgt.Data.User

In the example above, stored parameters will be associated to the user.  In this way, the parameter values may survive across several sessions.

Whenever saving or loading parameters to the User Parameter Store, action diagram code must be inserted to specify the value of the local ParameterStoreWork<UserLoginName> field.