cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Dual Super User III
Dual Super User III

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
 

Dual Super User III
Dual Super User III

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (91,171)