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

Community site session details

Session Id : vAgzb9NedVLNglH/2VVun5
Power Apps - Building Power Apps
Answered

Capture and Use Unique ID

Like (0) ShareShare
ReportReport
Posted on 8 Feb 2024 18:35:12 by 5,081 Super User 2025 Season 2

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:
  • Verified answer
    Michael E. Gernaey Profile Picture
    45,301 Super User 2025 Season 2 on 08 Feb 2024 at 18:51:20
    Re: Capture and Use Unique ID

    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2