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 / Defaulting a dropdown ...
Power Apps
Unanswered

Defaulting a dropdown to the currently selected record

(0) ShareShare
ReportReport
Posted on by 350

I've tried this but this code only sorts the list.  

 

Distinct(Sort(OptrackInventoryForms_RestockLevels_qtys,WAREHOUSE),Upper(WAREHOUSE))

 

Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at

    hey   

     

    Here’s an example of how you might set this up:

    Suppose you have a Gallery (Gallery1) where users select a record, and you want the dropdown to default to the WAREHOUSE field of the selected item in this gallery.

     

    Dropdown Default property: Gallery1.Selected.WAREHOUSE

     Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

     

     

    @rroque

  • rroque Profile Picture
    350 on at

    Sorry your answer did not fix.  Getting error on the drop down control.

     

    Here's the code.

    tbl_OptrackRequisitions.Selected.Value.FORM_NO

  • rroque Profile Picture
    350 on at

    This version did not work. 

    tbl_OptrackRequisitions.Selected.FORM_NO

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    @rroque ,

    Just an observation, but based on your posted question, are you trying to do this ?

    Distinct(
     AddColumns(
     OptrackInventoryForms_RestockLevels_qtys,
     "WareHouse",
     Upper(WAREHOUSE)
     ),
     WareHouse
    )

     

  • rroque Profile Picture
    350 on at

    I 'm new to power apps so im not sure about the syntax.

    I dont think I need to add columns.  What I need is to populate the dropdown then when In edit mode I need to list the warehouse from the currently selected record. 

  • rroque Profile Picture
    350 on at

    Here's the syntax to populate and sort the drop down.  Now I need to highlight the form from the selected record.  

     

    Distinct(Sort(tbl_OptrackRequisitions, FORM_NO))

  • rroque Profile Picture
    350 on at

    I can load the list and alphabetize it.  I need to be able to highlight the form_no and warehouse from the currently selected record.  

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    @rroque ,

    That is exactly what the code is doing - AddColumns is simply making it not case sensitive

  • Verified answer
    rroque Profile Picture
    350 on at

    I found the answer right here in this portal I'll share what I learned.

    1. Load the dropdown and sort it. - Distinct(Sort(OptrackInventoryForms_RestockLevels_qtys,WAREHOUSE),Upper(WAREHOUSE))

    2. Insert a label on the form.  Set the label equal to the column you need from your data source. Such as  Parent.Default

    3. On your dropdown make it's default property equal to the label control.  

    4. Put the dropdown on top of the label and the label send to back.  

    5. You now have a populated dropdown and the selected warehouse from the currently selected record highlighted. 

     

    Thanks y'all.    

  • rroque Profile Picture
    350 on at

    On second thought I'll try this. If this does work I'll eliminate couple steps.  

    Thank you.  

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard