define the form view
Overview
When you add an entity to the metamodel, the first view for that entity is the Detail view. That [Detail] view is also a form view. The form view definition defines the following items as the representation format of the model.
- Fields to edit on the form and their layout
- Field representation format (text/list/grid, etc.)
Let's update the definition of the Detail view in the next step so that we can edit the details of the UseCase model in the form view.
- Add [Actor] and [Use case], which are the components of [Use case model], to the form
- Change display format of [Use case] to grid
Image of form view to define
1. Add actors and use cases to the form
add field
When you display the Detail view of the UseCase model, the form view shows the title and the Description field. The model components Actor and Use case can also be added to the form view as fields.
Here, we will explain the procedure for adding [Actor] and [Use case] to the form view in the following expression format.
Filelds | Representation format (form element) |
---|---|
Actors | Lists |
Use case | List |
- Select an existing element on the form to identify the view to add the field to. This activates the commands provided under Profile > Form on the ribbon.
- Click Profile > Form > Add Exist Fields from the ribbon to add form elements for each field from the New Control dialog.
Add Subordinate Field
Fields that [Actor] has can also be added under [Actor]. To add the Actor's Description to the Form view, do the following:
- Select one of the actors listed on the form. If the list is empty, add one actor and select it.
- As before, add the Description field by clicking Profile > Form > Add Exist Fields from the ribbon.
2. Change display format of use case to grid
Change to grid format and add columns
Model components can be represented in a grid format as well as a list format.
This section describes the procedure to change the list format [Use case] to the grid format and add the [Description] and [Precondition] fields to the columns of the grid.
- Select the field on the form view whose representation you want to change.
- Click [Form] > [Control] > [Change Shape Type] from the ribbon and click [Grid] to switch to grid format.
- Select one of the use cases displayed in the grid. Add one use case if the grid is empty and then select it.
- From the ribbon click Form > Grid > Add Exist Field Column and in the Add New Column dialog select a field to add to the grid's column.