Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
SpeedScript : WebSpeed API functions : Passing information between Web requests : User fields
 
User fields
WebSpeed provides a global list that allows Web objects to communicate on the same agent. This is the user field list. As a global data structure, several Web objects running in a single Web request or in the same WebSpeed transaction can pass information in user fields without passing parameters. Two API functions support user fields, as shown in the following table.
Table 7. User field API functions
Function
Return type
Description
get-user-field
CHARACTER
Returns the associated value for a specified user field that was set with set-user-field. If the user field name is specified as the Unknown value (?), the entire list of user fields is returned.
set-user-field
LOGICAL
Sets the associated value for a specified user field. Parameters include the name and value of the field. If the number of fields is less than or equal to 255, the function returns TRUE. Otherwise, it returns FALSE.
The definitions for these functions reside in install-path/src/web/method/cgiutils.i.
User fields are name/value settings maintained as lists in WebSpeed global character variables. As such, these fields are available, without need of declaration, to all Web objects running on the same agent for the same Web request or WebSpeed transaction (if the agent is locked). Thus, where there is no WebSpeed transaction, user fields provide a means to pass data among several Web objects servicing a single request.
The set-user-field function has wide application in WebSpeed. It sets up name/value pairs for several other data passing API functions, including url-format, url-field-list (for query strings), hidden-field-list, and get-value.