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

Dropdown: Text (display) and Value (pass)

Hi,

 

I have a dropdown control which pulls data from a SharePoint list. I would like the dropdown box to display the city name (City.Name) and pass the value of that city name (City.ID) onto a gallery, which will be filtered based on the City.ID, not the City.Name.

 

In the "Advnaced" tap for the dropdown, I've tried to set the Items to City.Name and the Value to City.ID, but when I set the Item to the Name, it forces the Value to Name as well, and won't let me manually set the Value. I've tried several other solutions I've found on the forums and don't seem to grasp what I am doing wrong. Can someone please point me in the right direction?

 

Thank you.

5 REPLIES 5
Dual Super User
Dual Super User

Re: Dropdown: Text (display) and Value (pass)

Hey @powerappstx 

 

In that case, update the configuration to:
 
1) Dropdown -> Items -> City
2) Select Value as Name from the fields in the right menu.
3) To get Id for selected city, use the expression: Dropdown1.Selected.ID
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
powerappstx
Level: Powered On

Re: Dropdown: Text (display) and Value (pass)

This is my configuration:

 

Dropdown box:

Items: Portfolio.Store (ex: New York, NY)

Default Value: MyDept (which is global variable. ex: "1000")

 

My problem is when I go to change the "Value" for the dropdown it only shows "Store" as an option. I'm allowed to change it.

 

Untitled.png

 

Dual Super User
Dual Super User

Re: Dropdown: Text (display) and Value (pass)

Hey @powerappstx 

 

Portfolio.Store restricts to one column of this Portfolio data source. You need to update the configuration as:
 
Items: Portfolio
Value: Store
 
To retrieve the value, you need to use: Dropdown1.Selected.ID
ID is the name of column you want to retrieve.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Lars4
Level: Powered On

Re: Dropdown: Text (display) and Value (pass)

If yashag2255's reply doesn't fit for your scenario, you could try using a combo box. These objects are much more flexible. 

powerappstx
Level: Powered On

Re: Dropdown: Text (display) and Value (pass)

Right, so this gets me back to where I was. 

 

Dropdown:

Items = Portfolio

Selected = ID

 

However, I would like the Display value of DropDown to equal a friendly name vs the ID.

 

Example:

City Table (SharePoint):

City Name:       ID:

New York         1000

Boston              2000

 

MyDept (Global Varible, O365 Dept Value)

 

I'd like this behavior:

 

DropDown:

Item Display = CityTable.City Name

Item Value = CItyTable.ID

Selected = MyDept

 

Essentially, I want the MyDept value to do a lookup into the City Table and display the City Name, not the City ID.

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps 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

Top Solution Authors
Top Kudoed Authors
Users online (6,299)