View fields
You can add multiple view fields to a form to display various pieces of data from different sources. To customize the presentation for any language, platform, or user role, you can use different initial values for every view of a form . You can also create workflow that communicates between the view fields by sending events.
For mid tier users, if you have custom content to display on the view fields, verify that the content displays correctly in web browsers.
Users cannot resize view fields. If a view field is too small to display its entire contents, the value of the Scroll Bar property (see Scroll Bar) determines whether scroll bars appear at the bottom and right side of the field.
View field with scroll bars
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.
You can enter any value that a browser can read. For example, you can enter your company's URL, the URL for a form in the mid tier, an HTML snippet, or Oracle JavaScript. The web page, form, or interpreted code appears in the view field in Developer Studio when you close the dialog box.You can also reference a template. See Using-templates-with-fields.
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.
- 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.