cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JohnMacDougall Helper I
Helper I

JSON function with a selected gallery item

I'm trying to send a record to Flow with the JSON function based on gallery item selected.

 

JSON(Gallery.Selected)

but it produces an error in the formula.

 

Any ideas on how to get this working with a selected gallery card?

1 ACCEPTED SOLUTION

Accepted Solutions
MikeWiese1
Frequent Visitor

Re: JSON function with a selected gallery item

@CarlosFigueira, thanks for this tip. I had to use two of the JSONFormat flags, but I got it working and managed to pass the currently-selected record to a Flow  with

 

PowerAppsDoMyGroovyThing.Run(JSON(BrowseGallery1.Selected, JSONFormat.IgnoreUnsupportedTypes & JSONFormat.IgnoreBinaryData))

View solution in original post

2 REPLIES 2
Power Apps
Power Apps

Re: JSON function with a selected gallery item

The Selected property in the gallery has not only the record that is bound to the gallery, but also the controls that are shown in the selected row - and serializing controls are not supported by the JSON function.

You can solve that by using the JSONFormat.IgnoreUnsupportedTypes option to the function:

JSON(Gallery.Selected, JSONFormat.IgnoreUnsupportedTypes)

If this still doesn't work, please hover the mouse on the JSON function, and it should give you more information about the error. If you post the error here, we should be able to help you solve that as well.

Hope this helps!

MikeWiese1
Frequent Visitor

Re: JSON function with a selected gallery item

@CarlosFigueira, thanks for this tip. I had to use two of the JSONFormat flags, but I got it working and managed to pass the currently-selected record to a Flow  with

 

PowerAppsDoMyGroovyThing.Run(JSON(BrowseGallery1.Selected, JSONFormat.IgnoreUnsupportedTypes & JSONFormat.IgnoreBinaryData))

View solution in original post

Helpful resources

Announcements
secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,065)