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:

  1. Navigate to Web Applications > partnerfinder > Flows > partner-finder.

  2. Click the Variables and Types icon (x) > Variables tab > fields.

    This is a screenshot of the values to select to add a new custom field to the Partner Card, in your Partner Finder search results.
  3. 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.

    This is a screenshot of manually adding the custom field API name to the Default Value region.
  4. Navigate to Web Applications > partnerfinder > Flows > partner-finder > partner-finder-search.

    This is a screenshot of selecting the partner-finder-search flow.
  5. Click the Variables and Types icon (x) > Types tab > PartnerResultsResponse > item[i].

    Then click the Add Field button.

    This is a screenshot of the values to select to add a new field to the Partner Card.
  6. Add the custom Region field, Region_c, to the list type which is used in the search results page.

    This is a screenshot of adding a new field to the Partner Card.
  7. Navigate to Web Applications > partnerfinder > Flows > partner-finder > partner-finder-search > Designer.

    This is a screenshot of the icon to select to display the Designer view.
  8. 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.)

    This is a screenshot of how you can tap a region inside the Designer where you want to add your new custom field.
    This is a screenshot of adding the custom field to the card.
  9. Click the Play icon to run the application to verify the change.

    This is a screenshot of the Play icon in VBCS.
  10. Verify the change. Notice that region information is now added to the Partner Card in the Partner Finder search results.

    This is a screenshot of the final result of adding the Region field to the Partner Card.