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 / Capture and Use Unique ID
Power Apps
Answered

Capture and Use Unique ID

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

The screenshot below has Gallery1 in which is TextInput1
that contains the 'Unique ID'. I have added a button in
Gallery1 I could use ThisItem language to capture Gallery1
data for use in another screen.

Is it possible to write a variable in the 'Client Attachments'

button on the left margin that capture the 'Unique ID' from

Gallery1 and then use that variable to auto-populate the

default state of a ComboBox in the second screen?

Phineas_0-1707416804166.png


Auto-populate Gallery1 'ID' field content from above into

ComboBox below.

Phineas_1-1707417247277.png

 

Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,974 Moderator on at

    Hi @Phineas ,

     

    I will show you but also explain it can be done a little different just for learning purposes.

     

    Also your code for your combo is confusing because you are doing a Distinct, which works on an entire field, so you will get multiple results and something normally for the items property.

     

    For Screen 2 are you trying to Select the Default item/Selected Items of the ComboBox based on the ID from Screen 1(Gallery 1)??. Thats different then saying populate a combo box with (selectable items) AKA the items property.

     

    Which one do you want??? a Default selected based on Screen 1 or the Items property filled based on Screen 1??

     

    That side for a moment lets talk about passing the data to Screen 2

    1. you do not need to capture the value in a variable at all. When you do that, especially since you are making it Global, its automatically available everywhere.

     

    Treat this value as a Context value from screen to screen.

    So dont use the global variable, just do this

    Navigate(Screen, Transition, { IdToSendToScreen2: Gallery1.Selected.IdColumn })

     

    Now in screen 2, use the (I made it up) Context Variable IdToSendToScreen2, inside the items formula or the Default/DefaultselectedItems formula to auto populate the selected item.

     

    and now you dont need to use a global variable.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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 510

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 281

Last 30 days Overall leaderboard