4D v13Video script |
||
|
4D v13
Video script
Video script
In this video, we're going to learn how to create forms. We'll use the Form wizard to set up forms to be integrated into the navigation interface. These forms are presented as lists as you saw in the example database at the start of this guide.
In the Navigation form, we currently have a width of 860 pixels to display lists, so we need to control the width of the forms that we are going to create:
4D offers to memorize the settings that we just defined in a template. A template saves all the display settings (except for fields) so as to save time when creating subsequent forms. By using templates, you save yourself many "clicks" when setting up major development projects and also guarantee graphic consistency.
You will notice that there are yellow indicators:
They specify the position of each form area.
To move control lines, simply click and drag them, but remember that an upper control line can never be moved beneath a lower one. To move all the control lines together:
This way, you maintain the same spacing between the control lines. CTRL+Z lets you move the control lines back to their original position. When you move control lines, if objects are also selected, they are resized as well. To change the size of objects:
Now we need to integrate this new form into the Navigation form:
By default, the form can be resized without constraints. For ergonomic reasons, we recommend constraining the width and height: So, we will:
We also check that:
When we enlarge the form, it is resized automatically according to the body size so as to display complete records. We can test the display. Currently, no records appear even though we have imported data into each table in previous chapters. This is normal because we do not have any previous selections. To select records in the Technicians table, we need to add a line of code to the "All" button in the Navigation form. So:
We'll come back to this concept of selections in more detail later on because it's an important facet of 4D. Let's test the form again => Technicians => All: all the records now appear. We'll proceed in the same way to integrate the list of interventions and locations into the navigation form. When we were creating the Interventions form, remember that we had an automatic relation of the Many-to-one type in the structure; this is what is going to let us use the information of the TECHNICIANS table in the Interventions form. We are going to transfer everything then:
and here we have a form that integrates information concerning the intervention and that related to the technicians. To execute the form, it is preferable now to do so by executing the method we created (the Navigation method) that here displays the list of interventions. For the moment, the "All" button is programmed to display the technicians. In the next video, we're going to change it so that this "All" button adapts to whichever list you click on. |
PROPERTIES
Product: 4D |