cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powerappstx
Regular Visitor

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
yashag2255
Dual Super User II
Dual Super User II

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!

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

 

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!

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

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (44,287)