Creating view fields
Use this procedure to create a view field.
For an overview of view fields, see View fields.
To create a view field
- Open the appropriate form.
- Right-click the form, and select Create a New Field > View.
The new view field appears on the form.
- Select the field.
- In the Properties tab, select the Text property, and click its ellipsis button.
- In the Text dialog box, enter an initial value for the view field, and click OK.
In view fields, the primitive value is returned from the server. If you use scripting in view fields, make sure that the script does not appear to users.
In a browser, the contents of a view field do not load automatically when users open a form. To display the initial value in those applications, perform one of these steps:
- Select the view and set the Set to Defaults property to True (governs New mode), and set user preferences to "Set Fields to Default Values" in New and Search modes in the AR System User Preference form.
- Use a Set Fields active link action to set the view field value to
$DEFAULT$when the form opens. In this case, set the execute on condition to Window Loaded.
You can also leave the Text property blank and use workflow to set the initial display value.
To make the contents of the view field persist across actions in the same window, make the view field a window-scoped global field. Create the view field with a field ID in the range of 3000000 to 3999999, and use workflow to set the initial value. See Creating global fields.
Do not use HTML snippets that contain tables or frames. Instead, use a URL to display this type of content.
- Set border and scroll bar properties. See Field Properties.
If the contents of the web page or HTML snippet are too large for the field, the value of the Scroll Bar property determines whether scroll bars appear at the field's bottom and right side in a browser.
- Set the other field properties as needed. See Field Properties.
- Select the view field, drag it to a position in the form, and adjust its size.
See Arranging fields in a form view.
- (Optional) Use a trim text field to add a label (view fields do not have labels).
- Right-click the form, and select Save.