cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shabilass
Helper II
Helper II

Save image captured from camera in SharePoint list and display back in PowerApps gallery

Hi,

 

I have an app that have 2 option.

 

1st screen: Have camera control to save the captured image in SharePoint list 

2nd screen: Have add picture control and also save the selected picture in SharePoint list the same column.

 

The scenario likely the same like facebook/instagram post where we can choose to post our picture directly from camera or from our phone gallery.

 

I have a problem to save both image (from camera&phone gallery) in SharePoint list and display them back in PowerApps gallery.

I tried to find the solutions online but mostly they save the image in document library not in SharePoint list.

 

Is there any solution/suggestion?

 

Hope anyone can help. Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @shabilass ,

Do you want to use camera or add picture to upload images to sharepoint list and then display in powerapps?

The point is:

  • Image uploaded in powerapps will only be binary, not image file. So to save a file to sharepoint, you need to use flow.
  • Picture column is read-only in powerapps. You could only update hyperlink column in powerapps.

So the solution is:

create a flow: save images from powerapps to sharepoint library as image file, update sharepoint list by using this image file's link in library

in powerapps: use camera and addpicture control to upload images and then call the flow

 

I've answered very detailed about how to create this kind of flow in these two issues, you could refer:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Pen-input-save-as-a-image-in-a-sharepoint-li...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Show-an-Image-in-a-form/td-p/606556

 

You are welcome to post your question here, if you still have any confusion.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-yutliu-msft
Community Support
Community Support

Hi @shabilass ,

Do you want to use camera or add picture to upload images to sharepoint list and then display in powerapps?

The point is:

  • Image uploaded in powerapps will only be binary, not image file. So to save a file to sharepoint, you need to use flow.
  • Picture column is read-only in powerapps. You could only update hyperlink column in powerapps.

So the solution is:

create a flow: save images from powerapps to sharepoint library as image file, update sharepoint list by using this image file's link in library

in powerapps: use camera and addpicture control to upload images and then call the flow

 

I've answered very detailed about how to create this kind of flow in these two issues, you could refer:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Pen-input-save-as-a-image-in-a-sharepoint-li...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Show-an-Image-in-a-form/td-p/606556

 

You are welcome to post your question here, if you still have any confusion.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @v-yutliu-msft 

 

Thank you for helping me!

 

create a flow: save images from powerapps to sharepoint library as image file, update sharepoint list by using this image file's link in library

 

I have created a flow to save images to SharePoint library follow your instruction. May question now, does the update SharePoint list flow is on the same flow or different flow? How i am supposed to do this?

refer to below picture, i have tried to follow your instruction. But i am confuse now what to put beside the "stuff" as the initialize variable value.

shabilass_0-1595295990759.png

 

Need your advise for this.

 

Thank you

 

Hi @shabilass ,

1)this flow is used to upload image to sharepoint library and return image's link to powerapps.

Then you need to update your sharepoint list by using the returned link in your powerapps.

2)there's only one parameter in the flow  (the initialize variable value).

In the Initialize variable action, you need to choose "ask in powerapps".

In the Parse JSON action, you need to choose JsonInput. (the variable that you create by using Initialize variable action).

So there's only one parameter in the flow  (the initialize variable value), you do not need to add a parse_json content variable.

The formula to call flow should be:

Set(link,'Copyof-pic7'.Run(stuff)
//stuff represent the initialize variable value

722.PNG

 

3)After you set link variable successfully , you could get the image link by using this formula:

link.response

You could use form or patch to update hyperlink column in your sharepoint list.

Patch function should be like:

Patch(...,....,{hyperlinkcolumnname:link.response})
//please fill in ... part and hyperlinkcolumnname

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yutliu-msft ,

 

Thank you for the explanation. Now i almost get it.

 

I found out that, after i saved my flow, exit and open back the flow in edit mode, the expression for "File Content" is auto update to"Pic". Can refer the image below. Any ideas why does this happened?

 

shabilass_0-1595474387805.png

 

auto update to this:

 

shabilass_1-1595474876409.png

 

 

Hi @shabilass ,

Yes, this works correctly.

The reason why File Content" is auto update to "Pic" is because of the schema that you set in the parse json action.

My flow looks like this:

7233.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yutliu-msft 

 

Thank you so much for your time and help.

 

It's works successfully!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

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

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (12,682)