How to Avoid Errors with Resource Attributes in Forms

Tags

Your forms are the direct link between your databases and your technicians in the field.

It is possible to link certain blocks in your forms to the attributes of your resources stored in the database.

image

A mistake to avoid

Never place a block linked to a resource attribute at the root of your form (i.e., outside of a selection or a creation).

Why?

When a block linked to a resource attribute is used outside of a selection or creation:

  • Either no resource is defined in the form, and the data entered will not be saved in any database (since the tool does not know which resource to store it in).
  • Or a main resource is defined, but the data entered will still not be saved, because the attribute is not correctly linked to the database of that resource.

👉 In both cases, the entered value is lost.

Best practice

To ensure the data entered in the field is correctly saved:

  • Always place your blocks linked to resource attributes inside an automatic/manual selection or a creation of a resource.
  • Make sure the attribute actually exists in the associated database.
✅
Possible exceptions

The only cases where a block linked to an attribute can be placed directly at the root of the form are when it is linked to:

  • a document attribute,
  • an intervention attribute,
  • a user attribute,
  • or a resource attribute, but only if you want to display the main resource already assigned to the intervention.