Skip to main content
Nintex Community Menu Bar
Question

Search Component - lookup field

  • July 10, 2024
  • 6 replies
  • 17 views

Forum|alt.badge.img+10

I added a lookup relationship field to the template of the search component but it doesn’t seem to be searching the lookup field values. Is this not possible?

For example: Using only the Contact object in the search I want to also search for Accounts. I add the Account field from the contact record but no results appear when searching for an account name.


This topic has been closed for replies.

6 replies

Forum|alt.badge.img+17

The relationship field I think is a reference to the record Id, not the name, so you would have to use the account name field instead of the reference field.


Forum|alt.badge.img+10
  • Author
  • July 10, 2024

Hi Raymond,

I am using Account__r.Name and the name shows in the template. If I just search by the Account name it doesn’t yield any results.


Forum|alt.badge.img+17

I can’t explain why it is happening but a quick work around would be to add a salesforce formula file on the contacts object that returns the account name, the add that field to your search


Forum|alt.badge.img+10
  • Author
  • July 10, 2024

Hey Raymond,

I thought that would work also but it doesn’t. If I search for the Account name through the Contact object it returns no results.


Forum|alt.badge.img+10
  • Nintex Employee
  • July 10, 2024

Hi Tami, the search component would need to have a return object set up for each of the objects that you’d like to search through. Is there something specific to your use case that prevents you from adding Account as a return object?


Forum|alt.badge.img+17

Depending on use case, you may only need one return object. For example, if yo wanted all the records from all the objects related to contacts to filter by a specific contact, then you could have contacts be the return object and the set the conditions on each model equal to the contact Id. Then you could filter multiple models/objects by the record Id from a single return object…