cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnMacDougall
Level: Powered On

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
Level: Powered On

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))
2 REPLIES 2
Highlighted
PowerApps Staff CarlosFigueira
PowerApps Staff

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
Level: Powered On

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))

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 475 members 4,645 guests
Please welcome our newest community members: