Add fields and controls to a form
In this exercise, you add the fields that you created in the Add fields exercise to the Defect record forms. Before you can make changes to the schema, you must check out the schema. If the schema is not checked out:
- In the Designer, click .
- In the Open Schema window, select Checkout a schema to edit or continue editing previously saved work. Select my_sample_schema from the table of schemas. If the schema is checked out, and you are continuing work from a previous editing session, click Finish. If the schema is not checked out, click Next and then click Finish.
To add the User_ID, Action_reason, Doc_Impact, and Doc_Description fields to the Defect_Base and Defect_Base_Submit record forms:
- In the Designer, expand the Record Types folder, the Defect folder, and the Forms folder.
- Double-click the Defect_Base form to open it. The Field List and Controls Pallet also open. If necessary, enlarge the Designer window to show the entire Defect_Base form, and stretch the length of the form so that there is enough room at the bottom to add a field.
- In the Field list, click the User_ID field and drag it to the bottom of the Main tab. The field appears on the form along with a text box control. The type of control that you see is based on the field type that you specified when you added the field to the record type.
- Double-click the text box to display its property sheet. Explore the tabs and the control features. Click OK to close it.
- In the Field list, click the Action_reason field and drag it to the form to the right of the User_ID field.
- Click the Documentation tab.
- In the Field List, click Doc_Impact and drag it to the form. The field and control appear on the form. Because you defined this field as a choice list,Rational® ClearQuest® uses a list box control. Click the list box in the form. To widen the list box, select a handle on the right side and drag it to the right.
- In the Field List, click the Doc_Description field and drag it to the form below the Doc_Impact field. Click the Doc_Description text box. To expand the length and width of the text box, select its handles and drag them .
In this exercise you used the Field List to place fields and their controls on the form. You can also drag controls, such as text boxes, push buttons, option buttons, and pictures from the Controls Pallet to the form.
To copy the four fields from the Defect_Base form to the Defect_Base_Submit form:
- In the Designer workspace, double-click Defect_Base_Submit to open it.
- In the Defect_Base form, right-click the User_ID text box and select Copy.
- Stretch the bottom of the Defect_Base_Submit form to make room for the new field.
- Right-click in the bottom of the Defect_Base_Submit form and select Paste. The User_ID field and text box control appear.
- Repeat the previous steps to copy the Action_reason field from the Defect_Base form to the Defect_Base_Submit form.
- In the Defect_Base form, click the Documentation tab. Click .
- In the Defect_Base_Submit form, click the Documentation tab. Right-click the form and select Paste. The two documentation fields and their controls appear in the form.
- Close both forms.