7. Alternative Methods for Creating Fields : Create a Field from a Field Template
 
Share this page                  
Create a Field from a Field Template
You can create a field based on a field template that you have created previously and stored in the current application or one that is stored in an included application. Field templates are prototypes from which you can generate individual fields on a form. For more information about creating your own field templates, see Create a Field Template.
You can also create fields by using templates that are paired with assistants to create automatically generated fields, such as bar graphs and meters, as discussed in Generating Fields from Predefined Templates). The new field has the visual characteristics, properties, and associated 4GL code as defined in the template.
To create a field based on a field template you have created (or based on a field template in an included application)
1. Open your frame in the Frame Editor (see Open an Existing Frame).
2. Click Insert, Field from Field Template.
The Select a Field Template dialog appears:
This dialog lists field templates in the current application and any included applications.
3. Select the name of an application, and then select a field template from that application.
4. Click OK.
The Select Field Template dialog closes.
5. Position the field on the form as described in Position Fields.
Workbench creates a field (or fields) based on the template.
6. (Optional) Use the Property Inspector to reset or modify any of the field's properties.
For more information, see Property Inspector.
7. Write a script for the field, if necessary. To associate the script with the field, click Edit, Field Script on the Frame Editor's floating menu bar.
Workbench opens the Script Editor (or your system editor), where you can write the script for the field.
For more information about writing scripts, see Writing Scripts and Procedures.
8. Click File, Save.