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

View solution in original post

2 REPLIES 2
Power Apps Staff CarlosFigueira
Power Apps 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))

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,578)