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 / 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,297 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,297 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

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard