cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate 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
Highlighted
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
Highlighted
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!

Highlighted
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

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,470)