How to show a dropdown for filtered lookup field?

  • 1
  • Question
  • Updated 5 years ago
  • Answered
Our organization has seperate objects to store phones, emails, and addresses related to our accounts and contacts.

We plan to have a Skuid tab which shows a table for each of these objects.

The contact lookup field on each of these tables is entered so the user can specify which contact in the account the phone number is for. That phone number will then also show up in the list of phone numbers on the contact page.

Is it possible for Skuid to look down to the contact level under each account, and show a dropdown choice for the contacts in the account level?

That way, the user would be able to intuitively pick which contact in the account the phone, email, or address information is for. Our users find the magnifying glass lookup feature of Salesforce to be a bit cumbersome in these cases.

There is never a case where we would want to let the user pick a contact outside of the account in this instance.
Photo of Greg Huete

Greg Huete

  • 2,340 Points 2k badge 2x thumb
  • hopeful

Posted 5 years ago

  • 1
Photo of Anna Wiersema

Anna Wiersema

  • 10,890 Points 10k badge 2x thumb
Yes. When you're adding models for each table (e.g. Phone, Email, Address), include a condition on the related contact's account.

Example Condition

  1. Click to add a new condition on the model and click on the block icon to select a field.

  2. Click on the green arrow icon next to the Contact lookup field.

  3. Select the Account lookup field.

  4. For Value choose "field from another model," your Accounts model, and the Id field from the account object.


Does that make sense? Let me know if you have any more questions, I'd be glad to explain this in greater depth!

Here's what that type of condition would look like, taking the WhoId/ContactId field on the Tasks object as our example:
task condition
Photo of Greg Huete

Greg Huete

  • 2,340 Points 2k badge 2x thumb
Anna, I'm having some trouble with this. I'm trying it out with emails, and it works, but it doesn't give me a dropdown box.

It still just lists all contacts in the database, and not contacts in the account:



Photo of Anna Wiersema

Anna Wiersema

  • 10,890 Points 10k badge 2x thumb
It looks like it may be an issue with the condition. Do you mind giving me login access to your org so I can check it out? Thanks!
Photo of Greg Huete

Greg Huete

  • 2,340 Points 2k badge 2x thumb
Just for the record, Anna and I solved this by clicking on the Contact field in the table, and clicking the filter tab specifically for that field.
Photo of Anna Wiersema

Anna Wiersema

  • 10,890 Points 10k badge 2x thumb
Yes! For lookup fields, you can set some conditions for them at the field level in the table (see this example).