cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GhassSD
Helper III
Helper III

JSON function with a selected gallery item to Flow

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 item ?

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

The problem is that there are too many unsupported column types in the standard record that you get using the gallery selected. The easiest way I've found to do it is to do a ShowColumns() on the data source to select just the columns you want and then do a Lookup on that using the Gallery.Selected.ID.  Something like this.

JSON(LookUp(ShowColumns(datasource,"Title","ID"),Gallery1.Selected.ID=ID))

Just add all the columns you want to pass to the flow to the ShowColumns function.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks for your reply,

 

This gallery point on SharePoint files, which column give the actual file content of the selected files ?

I need the content of that file in order to add in flow and send it as attachement
 

In that case you would be better off sending the File ID of the selected gallery item to the flow and have flow retrieve the file and content directly using the file id.  For that you won't have to translate anything to JSON and it will be a much smaller package beign sent to the flow which should improve performance.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,279)