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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Saving the index of a ...
Power Apps
Answered

Saving the index of a dropdown selected value to local variable or hidden label

(0) ShareShare
ReportReport
Posted on by 534

@RandyHayes You brought up an interesting point in my other ticket.  So I thought I'd open this for an explanation.  When the dropdown items are filtered as they are below...All the resulting columns from that view are still usable.

tonykiefer_0-1636052884694.png

 

So the resulting dataset for the dropdown list is this.  The dropdown list displays the PLM_BOM_RESULT.

tonykiefer_1-1636052993405.png

 

If I selected the 4th record in the dropdown...

Component_Change_Combobox

tonykiefer_0-1636053760518.png

and If I wanted to preserve the "Seq" or AX_ItemID and save it to a local variable or hidden label from that selection...How would that look?  

 

When you mentioned this is my previous ticket I had an "Ah Ha" moment and this made me realize a cool feature down the road in my development.

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @tonykiefer 

    Well, you really don't need to put it in some variable....it is already there!

     

    At ANY point that you want, you can reference Component_Change_Combobox.Selected.Seq or Component_Change_Combobox.Selected.AX_ItemID and it will have the value you want.

     

    Adding it to a variable means you need to manage that variable all the time because it is a snapshot and will not change on its own.

    Adding it to a hidden label is a waste because that would just reference the combobox to then reference the label.  Cut the middle-man and just go to the combobox selected column value you want at any time.

     

  • tonykiefer Profile Picture
    534 on at

    @RandyHayes quick and easy!  That's the way I like it.  This is a great little tidbit that I am partially aware of in that I know I can access the datapoint as such Component_Change_Combobox.Selected.Seq...but KNOWING that I can use it later on the page (I'm assuming the page hasn't refreshed and the value is infact cached, somewhere) is a valuable learning point.  You should make a quick little video on this.  Viewers will dig it for sure!  It's the little things like this that are eye-poppers.

  • tonykiefer Profile Picture
    534 on at

    @RandyHayes ...it's an eye-popper because you could then use that datapoint to drive values in other fields...like a cascading dropdown list for instance.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @tonykiefer 

    It is actually more than that...it is global.  You can access that value from anywhere in your App!  Controls are global.  So, if you have another screen and want to reference something about that selected Item, you can do so.

     

    Yes...I actually have some simple tips and tricks videos on my video's to make list.  I've been way behind on them *sigh*  I just need more time in every day!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard