Skip to main content

Usage example

Let's have our example offer automatically display the location of the person selected in a Person business object parameter. Additionally, the field for the location information should dynamically be made visible only if the Person parameter is not empty.

Create and configure the read-only attribute

  1. Expand the Configuration elements section of the offer and click Create a configuration element.

  2. In the creation editor, select Configuration element type = Parameter, Parameter type = Read-only attribute.

  3. Fill in the Internal name and Label fields.

  4. In the Values and dependencies section:

    • Select Parameter used for evaluation = Person (the Shop business object parameter whose attribute is to be displayed). The name of associated USM business object gets displayed on the right of the field.

    • Select Displayed attribute = Location - room summary

  5. Click Save configuration element to finish the element creation.

    43_ReadOnlyAttr_Example_1.png
  6. The newly created read-only attribute parameter will be placed at the end of the configuration elements list, You will probably want to drag it to a position adjacent to the Person parameter (as captured in the image below).

    43_ReadOnlyAttr_Example_2.png

End user perspective

The Current location field displays the location as soon as a person is selected. Until then the field prompts the user to make the person selection.

43_ReadOnlyAttr_Example_3.png

Make the attribute conditionally visible

To streamline the user interface, you can hide the read-only attribute until a person is selected.

  1. Open the read-only attribute for editing.

  2. Set its Visible attribute to No.

  3. Click button Create rule under Visibility and mandatory rules. The rule creation editor opens.

    • Select Parameter that triggers the rule = Person

    • Choose Select the condition for Person = Parameter is not empty.

    • Set Target state for Current location to Visible = Yes.

    43_ReadOnlyAttr_Example_4.png
  4. Save the changes and update the configuration element.

End user perspective

The current location information is now visible only when a person is selected.

43_ReadOnlyAttr_Example_5.png