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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,129)