How to add secondary attributes to referral fields
When you use a referral field, the values of only the name field are displayed as options on the dropdown list. Sometimes, you might want to display more attributes alongside the name, for example, also display a phone number or a branch. To do so, you specify the additional attributes for the referral fields.
You can display upto two additional attributes.
How to
You can add secondary attributes to fields for both modules and users.
- Log in to the web app.
- On the left menu panel, click Customize > Module Settings. Click the pencil icon :material-lead-pencil: for the module that contains the original field.
- Click JSON View and locate the
referralConfig
object. - In this object, create another object called
displayConfig
. (See How to create a JSON object.) -
In this
displayConfig
object, add the field codes for the additional attributes. Here's an example:{ "secondaryAttribute": ["branchcode_7qr25n1p","phone"] }
-
Click Save. Then, release the changes.
- Log in to the web app.
- On the left menu panel, click Customize > Global Settings.
- Scroll down to Advanced Settings and click JSON Configurations.
- Locate the
userDisplayConfig
object and, in this object, create another object calleddisplayConfig
. (See How to create a JSON object.) -
In this
userDisplayConfig
object, add the field codes for the additional attributes. Here's an example:{ "secondaryAttribute": ["branchcode_7qr25n1p","phone"] }
-
Click Save. Then, release the changes.