cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Gallery Selected, how do I save one item from gallery selected into a variable, allowed to be used elsewhere in app

Hello, 
    I built a database search in powerapps, and after I enter the detailed screen from selecting a part how do I save just one item of that part row, so I can use it elsewhere in application, and reference back to it? I'm using the default search database application right now.

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@Anonymous 

When a gallery item is selected, regardless of what is displayed in the gallery, the entire record is selected and any field in the record can be referenced from anywhere in the app.  ie. Gallery1.Selected.fieldname.  It is not usually necessary to create a variable although you can by using the OnSelect property of the gallery or an icon in the selected item and use the Set(varRecord,ThisItem) and then in other parts of the app, use varRecord.fieldname  to specify various fields from the selected record. 

View solution in original post

2 REPLIES 2
Drrickryp
Super User
Super User

@Anonymous 

When a gallery item is selected, regardless of what is displayed in the gallery, the entire record is selected and any field in the record can be referenced from anywhere in the app.  ie. Gallery1.Selected.fieldname.  It is not usually necessary to create a variable although you can by using the OnSelect property of the gallery or an icon in the selected item and use the Set(varRecord,ThisItem) and then in other parts of the app, use varRecord.fieldname  to specify various fields from the selected record. 

Anonymous
Not applicable

Thank you for the help, I didn't realize that!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,241)