Hello Everyone,
I would like to use the expression below and be able to select your own image from you PC and that selected image to still be visible when I use the app again.
User().Image
I hope anyone can help.
Are you getting an error, if so can you share? Also screenshots of the expressions in Maker portal will help to investigate. I've tried my end and and it works perfectly....
I directly set "Office365Users.MyProfileV2().mail" in the Patch formula, but when I upload an image I don't see it on the Image control and the Patch Formula doesn't upload the image to SharePoint nor the mail of the user.
Try to set it directly, in design mode if you don't explicitly call the OnStart (right click on the App and run OnStart) it won't run.
Hi @EricRegnier, Sorry, "currUsers.mail" is "Office365Users.MyProfileV2().mail". "currUsers.mail" is a variable I use on the OnStart on the app.
It's looks ok. My only question is what is "currUsers.mail" in your first expression? Shouldn't this be "Office365Users.MyProfileV2().mail"?
Hi @EricRegnier , I am not sure if I am doing something wrong.
I used the Upload image control and a separate to use the Patch with.
UploadedImage1 Image property has this formula
I created tow columns on SharePoint called Email Image (Single Line Text) and Profile Image (Image)
LookUp(SPList, 'Email Image' = currUsers.mail).'Profile Image'
On the button I use this formula
Patch(SPList, LookUp(SPList, 'Email Image' = Office365Users.MyProfileV2().mail), { 'Profile Image': UploadedImage1.Image})
Thanks for clarifying, you wouldn't be able to use the Office365Users object to retrieve the image. You'll have to use the SharePoint connector connected to your SharePoint list. Add an Image column to the SharePoint list. And you'll be able to update the image directly. Here's an example of how expression to save the Image to a SharePoint list. The list would be the list of images, a row for each user:
Patch(MyList, LookUp(MyList, Email = "email@email.com"), { ImageColumn: UploadedImage1.Image})
Then you set the "Image" property of the Image control with a similar expression:
LookUp(MyList, Email = "email@email.com").ImageColumn
Hope this helps!
Hi @EricRegnier , I mean that when the user uses the Add picture tool that is specific image they used will be saved in a SharePoint list and will be visible when they close and open the app again.
Office365Users.MyProfileV2().displayName was just a reference to displayName that user uploaded image might link to on SharePoint.
I hope that helps.