Combobox Paceholder

0
Hello, I want to have a value preselected in a combo box based on the user. That means the value shown depends on the user, but it should still be changeable. Can someone help me with that?
asked
1 answers
1

Steps to follow :

  1. Add association or attribute to store user’s selection

    • Example:

      • Entity: UserSettings

      • Attribute/association: PreferredDepartmentDepartment (the Combo Box source).

  2. Set the default value using a microflow/nanoflow

    • On page load or in data source microflow:

      • Retrieve the current user ($currentUser).

      • Retrieve or create their related object (like UserSettings).

      • Based on the user’s info, set the default reference:

        change UserSettings set UserSettings/PreferredDepartment = DepartmentObject

      • Return that object as the page parameter.

  3. In the page Combo Box

    • Data source: Association or microflow returning available options.

    • Value (reference): The attribute you set above (e.g., PreferredDepartment).

    • Display attribute: The name to show (e.g., DepartmentName).

  4. Result

    • When the page opens, the Combo Box automatically shows the default value linked to the user.

    • The user can still manually change it.

answered