Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

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))

 

  • rroque Profile Picture
    350 on at
    Re: Defaulting a dropdown to the currently selected record

    I'll give a try thank you.  

  • WarrenBelz Profile Picture
    146,522 Most Valuable Professional on at
    Re: Defaulting a dropdown to the currently selected record

    Hi @rroque ,

    I can assure you the code is valid syntax based on what you posted - you might re-test this. With a Sort included it would be

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

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • rroque Profile Picture
    350 on at
    Re: Defaulting a dropdown to the currently selected record

    Hi Warren, I tried your code it's complaining about missing parameter.  

  • rroque Profile Picture
    350 on at
    Re: Defaulting a dropdown to the currently selected record

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

    Thank you.  

  • Verified answer
    rroque Profile Picture
    350 on at
    Re: Defaulting a dropdown to the currently selected record

    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.    

  • WarrenBelz Profile Picture
    146,522 Most Valuable Professional on at
    Re: Defaulting a dropdown to the currently selected record

    @rroque ,

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

  • rroque Profile Picture
    350 on at
    Re: Defaulting a dropdown to the currently selected record

    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.  

  • rroque Profile Picture
    350 on at
    Re: Defaulting a dropdown to the currently selected record

    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
    Re: Defaulting a dropdown to the currently selected record

    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. 

  • WarrenBelz Profile Picture
    146,522 Most Valuable Professional on at
    Re: Defaulting a dropdown to the currently selected record

    @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
    )

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard