cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

How to add record to a library using PowerApps

In my gallery, some items have images (pictures taken by device camera) and some don't. I have successfully created a flow that would add items to SharePoint library but flow fails when there is no image for particular item(s). Hence I tried to do use patch function for items where there is no image and in patch function I checked if Image isBlank() then Patch the library. But Patch fails and SharePoint server error suggests to use SPFileCollection.Add().

 

How would I do that or any suggestion?

 

Is there any way I can supply a blank value for image ( I tried " ", but did not work)? Would Blank() work?

I have a pseudo code for the combined implementation :

ForAll(gallery.AllItems,If(!IsBlank(Image),CallFlowThatAddItemToSharePointLibrary,ElseCallPatch( LibraryName, Defaults(LibraryName),{ColumnName1:Value1, ColumnName2:Value2,.....})))

 

Any suggestion is appreciated.

Note: I doubt that patch works on library. It worked fine for SharePointList because list does not have file content where as library has a file content.

4 REPLIES 4
Highlighted
Helper V
Helper V

Have you made this successfully work with images exist for the items?

Highlighted
Community Support
Community Support

Hi @Anonymous,

 

Are you using method in below blog to upload the images to SharePoint library:

https://www.techmikael.com/2017/05/saving-collection-of-images-from.html?showComment=1495199384722#c3722874462677054296

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable


@Lisabel0 wrote:

Have you made this successfully work with images exist for the items?


Yes, I did as I mentioned in my post using flow. I successfuiiy uploaded images but I can not with there is no image but all metadata. 

Highlighted
Anonymous
Not applicable

Yes I did


@v-monli-msft wrote:

Hi @Anonymous,

 

Are you using method in below blog to upload the images to SharePoint library:

https://www.techmikael.com/2017/05/saving-collection-of-images-from.html?showComment=1495199384722#c3722874462677054296

 

Regards,

Mona


Yes, I did. If there is no image, flow fails as I mentioned in my post.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (13,144)