cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
arnonel
Level: Powered On

Forms, Lookups, Dropdownlists

Capture.PNG

 

Hi 

 

See above. 

I have a form. Form has a dropdown list due to field being a lookup to "Client" Entity (Client Entity has 2 fields: ClientID, and ClientName. ClientID is the "Title" field)

 

The displaytext is the ID - how can I change the dropdownlist display text to be "ClientName", instead of the current "ClientID" ?

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff Vijeta
PowerApps Staff

Re: Forms, Lookups, Dropdownlists

Thanks for trying that out. On your custom parent entity for example p1 did you add the field you want to display in the dropdown to the default lookup field group like this? Did you add a text type field or some other type?default_lookup_fg.png

Can you refresh the datasource in PowerApps web player/studio or try a new AFD. This is what I see on the lookup field/relationship for my child entity c1. I am assuming you are trying this in your new environment not the legacy environment.

display_fld.png

View solution in original post

60 REPLIES 60
Perumal
Level 10

Re: Forms, Lookups, Dropdownlists

I could not understand your question, are you refering to CDM entity which is used as source in the dropdownlist?. In that case, you just need to use "Items" in dropdownlist with "Client.ClientName".

arnonel
Level: Powered On

Re: Forms, Lookups, Dropdownlists

I have the following entities

  • Client Contact:
    • ClientContactID: number sequence (title)
    • ClientFullname: Text
    • Client: Lookup (Client below)
  • Client:
    • ClientID: number sequence  (title)
    • ClientName: Text

 

I want to create an edit form for Client Contact, so I:

  • Create new screen
  • Throw a form on it
  • Set data source to "Client Contact" entity above
  • Enable the following datacards:
    • ClientFullname
    • Client
      • When doing this, i choose "edit lookup"
      • Values displayed are "ClientID" - but I want it to display "ClientName"

 

Make more sense?

Perumal
Level 10

Re: Forms, Lookups, Dropdownlists

I am just going to try this. Are you referring entity to CDM or Sharepoint list?

arnonel
Level: Powered On

Re: Forms, Lookups, Dropdownlists

CDM

hpkeong
Level 10

Re: Forms, Lookups, Dropdownlists

Hi

 

As Perumal mentioned, just change from ClientID to ClientName.

But, before this, please remember to:

- UnLock (see the top menu, Advanced Tap, and you can unlock)

- Then, change the contents inside the card and related value.

 

Please refer to:

Understand Data Cards....https://powerapps.microsoft.com/en-us/tutorials/working-with-cards/

 Screenshot (252).pngIn thid Understand Data Card section, it clearly explain how to manipulate this Standard Forms and modify to suit your needs. Just take note of each value, parent.value, etc. when chaing.

Hope this will further clarifies your doubts and helps.

TQ

 

 

hpkeong
Perumal
Level 10

Re: Forms, Lookups, Dropdownlists

I tried it. It seems currently "Title" alone can be referred in the lookup fields. The possible solution, I found is to have another field which holds the Client.ClientName using LookUp function as below.

 

LookUp(Client,TextBox10.Text in Title).ClientName

arnonel
Level: Powered On

Re: Forms, Lookups, Dropdownlists

I have about 100 lookups going across 50 Entities. 

 

This cannot be the answer. Is there a more "elegant" way?

hpkeong
Level 10

Re: Forms, Lookups, Dropdownlists

Hi

 

If you have such a huge data and complicated look-up and entities, why not do:

- Manual Dropdown and do not set as LookUp in CDM Entities

- As PowerApps doesn't know what do you want, you have to do it manually.

 

Automatic FORMS (Edit, Display) are meant for simple apps set-up and then, expand from here to complicated apps.

 

Thanks,

 

 

 

hpkeong
arnonel
Level: Powered On

Re: Forms, Lookups, Dropdownlists

My app is not complicated.

 

The requirement above is a simplre requirement, and would assume its a VERY common use case. 

A lookup to an ID (which is what Title is) should be common.

 

The issue is:

  • Make title field user friendly - then I cannot edit it (see my previous "bug" post)
  • Make titlel field an ID - then its not readable in a dropdownlist

So I am completely stumped.

 

In Summary - My requirement above is simple. 

What makes it a big issue for me, is scale. If it have to do workarounds, I have to do many MANY workarounds due to the number of entities and forms I have. 

The requirement should be VERY simple, and cannot understand the thinking behind this. 

A dropdownlist in a datacard should allow you to set text (what the user sees) and value (what the user doesnt see)

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,959)