QMF Visionary enables you to capture user information (or other information, such as a query result) and pass it to other parts of your world with parameters.
Parameters enable you to do the following tasks:
You can use parameters in many ways. Event actions typically capture user input in a parameter. You can use global and scene parameters when you design interactive controls in your scenes; when a user makes a selection in the control, an underlying event action sets the parameter value. The parameter value determines what data is displayed or how it is displayed.
The figure below shows the process by which information about a user event can be passed from the control to other actions in your world.
In many scenarios, you might use a control to obtain information, but in general you must capture the user input either as a constant or into a parameter.
Parameters can be of the following types:
Before you define a parameter, decide on a default value for it. You need to know your data to do this; you can check your query results in the Data Sheet view to see what records are returned and then select a value. For example, if you want to define a parameter that specifies a particular store ID, you can select all the store IDs from a table containing store information to determine a default value from among the possible query results.
To define a parameter, complete the Insert Parameter dialog box by providing the following information:
The parameter name appears in the relevant parameters folder: Globals, Locals, or Queries.
A global parameter is available to all scenes in a world and to the end user. You can set global parameters when you specify object properties or when you specify event actions. For example, after you publish your world and you deploy it in a Visual Basic application, the defined global parameters determine the initial level of detail and the viewer class.
Global parameters can be public or private. A public parameter can be modified by the end user in the Runtime Settings dialog box or via the container application.
QMF Visionary provides four built-in global parameters: ViewerX, ViewerY, ViewerZoom, and ViewerClass.
To define a global parameter, click Insert --> Global Parameter.
For more information on modifying object properties and for information about functional expressions, see Property expression examples.
Use the ViewerClass global parameter to alter the appearance or behavior of a world, based on a viewer's identity. You can restrict access to certain scenes or data to those that belong to a specified viewer class. Viewer classes are not secure; users can change their viewer class in published worlds. You implement viewer classes with the IsViewer() function when you specify event actions or object properties, such as visibility, in a scene.
A scene parameter is available in the scene in which it is defined. When you create wormholes and event actions, you pass scene parameters. You can also set the value of a scene parameter with an event action.
For example, when you create a wormhole, you connect two scenes and pass information from one scene to another. To set a wormhole parameter, first you insert a parameter in the source scene of the wormhole, and then you enter the value of the parameter for the wormhole destination scene in the Wormhole.SceneParameter child object in the Object Inspector. The scene parameter name must be unique.
Scene parameters appear in the Locals folder under the scene in the World Manager.