About UX Openings

UX openings are dedicated to the customization of the New... dialog boxes and the Properties and Instance tabs of the Information panel in web apps.

UX openings allow you to guide users through the user interface by restricting the possibilities and providing direct feedback before they save their modifications.

This page discusses:

Possible Customization with UX Openings

With UX openings, you can:

  • Hide visible attributes in the dialog box.

    Corresponding property: Visibility

  • Define whether an attribute is read-only or editable.

    Corresponding property: ReadOnly

  • Define the authorized values for an attribute.

    Corresponding property: AuthorizedValues

  • Configure messages displayed to end users, along with their severity (error, warning, or information).

    Corresponding property: Notification

Important: Customization with UX openings does not apply to classification attributes.

UX Openings and EKL Functions

UX openings use specific EKL functions to create the scripts. For more information, see 3DEXPERIENCE | Enterprise Knowledge Language | Enterprise Knowledge Language | Server Types and Functions | EKL Functions by Modeler | ER Generic Server EKL Functions for UX Openings.

Important: Modifying an attribute value with ThisObject.SetAttribute is only possible with ux_init_new_modify and ux_init_edit_properties_modify openings. With ux-specific compute openings (compute_new_init and compute_edit_properties_init), you can only read an attribute value with ThisObject.GetAttribute.

For dimension attributes in ux_init_new_modify and ux_init_edit_properties_modify openings, the SetAttributeValue function is also available. For more information, see 3DEXPERIENCE | Enterprise Knowledge Language | Enterprise Knowledge Language | Server Types and Functions | EKL Functions by Modeler | ER Generic Server EKL Functions.

The UX openings let you customize attributes in UX components (New... dialog boxes and Properties and Instance tabs of the Information panel. The EKL script can access the attributes of the object only, but cannot navigate to other objects (child objects, for example). Therefore, you can use only EKL functions that manage attributes (either generic or modeler-specific) in your UX opening scripts. Any other generic or modeler-specific EKL function is not supported with UX openings; they either fail or return nothing.

Access to Attributes from EKL Scripts

The attributes available for an object and the properties available for an attribute depend on the UX component. All attributes are not always available for an object, and all properties are not always available for an attribute.

In UX openings dedicated to the Properties and Instance tabs of the Information panel, the script can usually access all attributes. In UX openings dedicated to New dialog boxes, the script can access fewer attributes: it can only access the attributes displayed in the dialog box, and the ones initialized at low level (by default, or with the init_create opening).

Note: In case of multiselection:
  • In the Information panel, only the attributes that are common for all the selected objects are displayed.
  • If you select several object types or objects with different extensions, the business logic might be executed on object types for which the business logic is not deployed, which is not the case for single selection.

The attributes that have UX properties are the attributes displayed or that can be displayed to users (that is, the attributes that would be displayed if no script was deployed to manage the attributes dynamically).

Always use the HasAttributeProperty function in your scripts before manipulating attributes (read or write a value, read or set a property). If the attribute is available for the object, the HasAttributeProperty function lets you know if a UX property is available for this attribute. For more information, see 3DEXPERIENCE | Enterprise Knowledge Language | Enterprise Knowledge Language | Server Types and Functions | EKL Functions by Modeler | ER Generic Server EKL Functions for UX Openings.

UX Openings and Other Customization Tools

The properties displayed in the New... dialog boxes or Properties and Instance tabs of the Information panel are defined at three different levels: schema, masks, and UX openings.

The schema corresponds to the default attribute rules defined for an object type, that you cannot modify. You can use masks and UX openings to customize the properties that you want to display.

Important: To ensure a satisfactory user experience, if your Enterprise Knowledge Language (EKL) script associated with UX openings takes longer than 2 seconds to complete, the user receives an error and the rules defined in the script are ignored.

At each level, you cannot remove a restriction imposed by a lower level: you can only restrict the existing scope of properties or property values allowed by the previous level. These customization tools are enforced in this order:

  1. Schema
  2. Mask
  3. UX opening

For example, if a property is defined as readonly=true in the schema, you cannot define this property as editable in a mask or UX opening.

Notes:
  • If you specify authorized values with an UX opening that are not allowed by a lower level of customization, they are still displayed in the user interface. However, users cannot create the object or save the modifications if they select an invalid value.
  • The mandatory constraint does not apply to read-only attributes.

Recommendation: Use UX openings to guide users through the user interface only. To implement rules that must be enforced in all cases (for example, authorized values for an attribute), implement them with a low-level openness, like a precommit opening.

For more information, see Social and Collaborative | Structured Collaboration & Collaborative Content | Collaborative Lifecycle Web App | Collaborative Lifecycle Web App | Administration | New and Insert New Commands | Customization Tools for New... Commands and 3DEXPERIENCE | 3DEXPERIENCE Web Apps | 3DEXPERIENCE Web Apps | Properties and Information | Administration | Customization Tools for the Properties Tab.

UX Openings with Multiselection

You can decide to have a business logic based on criterias like it is single selection or multi selection or same/different type of objects multiselection, etc.

Recommendation: Check that the script is appropriate for both single selection and multi selection of different object types (possibly common or different attributes, with same or different values).

In case of multiselection, the business logic is executed once for all the selected objects if:

  • All the selected objects are the same type and the business rule is deployed for this type.
  • The business logic is deployed for only one of the selected object types.
  • The business logic is deployed for at least two selected object types.
If the business logic is not deployed for any of the selected object types, the business logic is not executed.

If an attribute has multiple values, you (admin) can read attribute values only if they are the same for all the selected objects. The HasSameValuesForMultipleObjects EKL method checks that the attribute has the same value for all the selected objects, and is applicable for UX openings business logics when selecting several objects. For more information, see 3DEXPERIENCE | Enterprise Knowledge Language | Enterprise Knowledge Language | Server Types and Functions | EKL Functions by Modeler | ER Generic Server EKL Functions for UX Openings.

Note: In the EKL method, you can only set a unique value for an attribute.