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

Highlighted
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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

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!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

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