Add a Custom Attribute to the Partner Card in Search Results
In this example, let's look at how to add the custom Region field to the Partner Card, in your Partner Finder search results. This will let users more easily see where the partners that they searched for are located.
In VBCS, complete these steps:
-
Navigate to Web Applications > partnerfinder > Flows > partner-finder.
-
Click the Variables and Types icon (x) > Variables tab > fields.
-
In the Default Value region, add the custom Region field, Region_c, to the existing list of fields required in the search response.
This means that the Region field will be included in the search results.
-
Navigate to Web Applications > partnerfinder > Flows > partner-finder > partner-finder-search.
-
Click the Variables and Types icon (x) > Types tab > PartnerResultsResponse > item[i].
Then click the Add Field button.
-
Add the custom Region field, Region_c, to the list type which is used in the search results page.
-
Navigate to Web Applications > partnerfinder > Flows > partner-finder > partner-finder-search > Designer.
-
Add the custom field, Region_c, to the search results html page inside the partner card.
Tap the section where you want the new custom field to be displayed and append the corresponding text section with $current.data.Region_c. (This is the new field that you added in the previous step.)
-
Click the Play icon to run the application to verify the change.
-
Verify the change. Notice that region information is now added to the Partner Card in the Partner Finder search results.