cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Lisabel0
Helper V
Helper V

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

v-monli-msft
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.
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. 

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (57,260)