cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Symira
Helper II
Helper II

Gallery count of the selected item

Hi,

I have a gallery with eg. 5 items. It the second record is selected, I would like to store that value (in this case 2) in a variable for further processing. Somehow I cant find a way to get that number of the record currently selected from the gallery. Any idea how this can be solved?

 

Thanks.

-S

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

That solution will give you a number for the position of the record in the gallery.  But you can't use it as an index to retrieve the item since the gallery doesn't support an integer index.  Its a meaningless number.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Pstork1
Dual Super User III
Dual Super User III

Galleries don't have an index number associated with the entries like an array would.  So unless you have a field that numbers the records there is no way to get or use a number that identifies which row in the gallery it is.  You can store any of the fields or the whole selected record in a variable, but there is no index to store.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Pstork1
Dual Super User III
Dual Super User III

That solution will give you a number for the position of the record in the gallery.  But you can't use it as an index to retrieve the item since the gallery doesn't support an integer index.  Its a meaningless number.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Ok, that makes sense. Thank you.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,226)