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

Save image using add picture control

Hi folks,

 

I am using add picture control give user to add any image as their profile picture and save it to share point list against user email. I was wondering, Is that even possible to save a selected picture in share point list? and follow up, if user also want to delete same profile picture then only profile picture should be deleted against his/her email and other records.

 

I have share point list named Users which have configured with user data.

 

Please guide me on that as I am trying to save it to SP list.

 

Thanks

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @Jackson_Dhorty ,

You should find the options available to you in this blog of mine.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Thanks @WarrenBelz for that. It solved my problem using patch in multi line text.

 

Is it possible that I can delete the same image against specific email?

Hi @Jackson_Dhorty ,

Simply Patch the field with Blank().

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Yes I have tried this already patch() and updateIf() function but unfortunately this doesn't work.

 

quick question here:

When I have used add picture control on blank screen and patch to share point list in  multi line text field using this expression:

 

With( { vJSON: Substitute( JSON( YourImageControlName.Image, JSONFormat.IncludeBinaryData ), """", "" ) }, Patch( YourListName, {ID: YourGalleryName.Selected.ID}, {YourMLTextField: vJSON} ) )

 

it works but .. when using the same add picture control in custom data card using form, it saves the value as "null" which is kind of confusing. Can you tell me what is wrong here?

 

Thanks

Hi @Jackson_Dhorty ,

I must admit I have never tried to put an Add Picture control into a form (is there any reason you would want to do this as it cannot be bound to any field in the form). Technically however the code should work as it is simply referring to the same type of element.

As to removing the picture, you would just (using the same code)

Patch(
   YourListName, 
   {ID: YourGalleryName.Selected.ID}, 
   {YourMLTextField: Blank()}
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

WarrenBelz
Super User
Super User

Hi @Jackson_Dhorty ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Thanks. Yes it worked, idk why it wasn't working before.

 

Regards

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,764)