web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How to show a different column in a lookup field instead of the primary name column?

(0) ShareShare
ReportReport
Posted on by 190

I have two related tables:  Requests and a custom users table.   It's a N:1 relationship. In the custom user table I have the user's full name as the primary name column.  I also have the email as another column.  

In the Requests form, I have two lookups to the same custom user table:  Requester and Requester email.  The user manually selects the Requester, then I have a javascript webresource that uses

XMLHttpRequest() to use the Requester value to select the email, and set the value to this Requester email field.  But the field still shows as the Requester instead, even though I am still able to get this email field to do something else with it and it works.  But I just want to know how to get it to show the email column instead of the primary name.  Thanks. 
I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Lookups were created to show the Primary Field value as a displayed value.

    If you want to have the requestor's email as a field on the form - create a text field instead of a lookup.

  • Verified answer
    Steve Zhao2 Profile Picture
    on at

    Hi bp3378,

    Andrew Butenko is correct. Lookup field displays the primary field value. This is by design and there is no OOB way to change this behavior. Although, you could use JS to modify the display name and the display name would not save into dataverse. However, it's not recommended to do like this.

    So, Andrew Butenko's suggestion (use text field instead of lookup) should be the way.

  • jdalske Profile Picture
    547 on at

    I am attempting to do this with the Lead Topic field so that it displays in the connected Opportunity.  If I use a lookup it pulls in NoName because why on earth would Contact be the primary field (that makes no sense and we don't even use that field).  Topic is our only required field.  I am no JS expert.  If you have any ideas on what JS I can put in my "Originating Lead" field on the Opportunity to show the topic of the Lead that would be most helpful.  Thank you in advance.

  • jdalske Profile Picture
    547 on at

    I think I got it without JS.  I just mapped the two fields in 1:N relationship:

    subject - Lead entity

    originatingtopic (text field) - Opportunity entity

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans