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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Setting a Dropdown def...
Power Apps
Unanswered

Setting a Dropdown default value using secondary field (not Value)

(0) ShareShare
ReportReport
Posted on by 34

Hello,

I have a dropdown that is created from two columns, like this:

Sort(ShowColumns(Filter([DataSource],[Column]=[FilteringCondition] ),"Description","Code"),Description,SortOrder.Ascending)

As a result, I have a dropdown with two fields available, "Description" and "Code". My Value property is set to Description field, so it shows all the descriptions from the list.

 

Similarly, the Default property is set to a variable that has a string that could be one of the descriptions possible, so it works fine and it positions the dropdown on the right element whenever the variable is set (if it is empty, shows the first element, as intended).

 

Question is: We can easily set Default by the Description content, but is there a way to Default it by the another column other than the one set in Value property? For instance, if I have a Code, can I use it to position the dropdown on the element that has that code, even though it is displaying Descriptions? Or are we "locked" to operations only on the Value-set column?

 

Thanks!

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @OCJ,

     

    That is certainly possible, but will require a slight adjustment to the Default property. As said, searching via the value field is very easy. You can simply save text to a string and use that as the default property.

     

    If we want to search via other fields, we will have to leverage a LookUp that returns the description of the record that matches our conditions:

    LookUp(DataSource, Description = variableName || Code = variableName).Description

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • OCJ Profile Picture
    34 on at

     

    Thanks for the reply but that unfortunately does not solve, since I have duplicated descriptions and that's why searching for the code is relevant. For instance, if my dropdown is like this (Code / Description):

    001 / TextA
    002 / TextB
    003 / TextB
    004 / TextC

    If I use the code mentioned above, searching for code 003 will return description "TextB" from the data source, which will set the dropdown to the first occurrence (due to the lookup) which is code 002, the wrong code.

     

    What I need is that I can search directly the dropdown using code = 003 and position it on the right element so when later I use dropdown.SelectedText.code, for instance, I get the code 003 and not 002.

     

    Looks like that even though PowerApps allows you to have multiple columns in the dropdown, you're stuck with the one set on the Value property for searching.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 321 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 289 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 200 Super User 2026 Season 1

Last 30 days Overall leaderboard