The 2 main objectives are:
- To be able to pre-fill form fields with the values available in the databases
- To be able to update databases directly from a form
- Edit the Engine_exercise maintenance form by clicking on "Open in the studio".
- On task 4.1, in the parameters choose linked to an attribute
- For the type select "Database" and "General Status" as a name. This "General status" attribute must be added to the Engines database beforehand.
- Then check allow editing and pre-fill the value
You can exit the form and go to part 2.
- In the Databases tab, find the ENGINE 1 resource (in the Engines database).
- Open the Attributes tab, click on Modify, in order to modify the attributes of the Engine1 resource.
- Modify the value of the attribute, called General condition, then validate
- Apply the value "Bad"
Complete the Engine maintenance form from the preview. At the start of the intervention, engine1 must be chosen as the resource associated with the intervention.
When asked What is the general condition of the engine, the Bad field will be pre-filled. It is possible to modify the value, it will update the database. You can continue with the procedure and finish it. Once the intervention is complete, you can view the new value of the General condition attribute for engine 1 in the engine database.
Now we want to automate the Operator Data part. Go back to the Engine maintenance form and open the editing studio to make changes to the form.
Edit the Operator Data (or General Data) model (remember to check the option "pre-fill the value in the application" on the various actions to come)
- For task 1.1, linked to a User attribute named First Name Last Name
- For task 1.2, linked to a User attribute named Function
- For task 1.3, linked to a User attribute named Telephone
If these attributes do not exist, you can create them in the Users section.
Exit the form by making the version active.
- Go to the Users section.
- Click on Attributes.
- Create and add the list of attributes mentioned in part 3 and fill in values for each attribute
- Launch the Engine maintenance form from the preview.
- Complete the intervention.
- For the email sent at the end of the intervention, fill in the subject line: "Operator connected"
Add in Cc "email@example.com"
By running the form, we now see that values are already pre-filled for the operator information. It saves time for the operator.