Skip to main content

Notifications

Power Apps - Microsoft Dataverse
Answered

PowerApps Image

(0) ShareShare
ReportReport
Posted on by 745

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.

 

@WarrenBelz   @ANB   @mmbr1606   @Amik   @timl 

Categories:
  • Caleb62881177 Profile Picture
    Caleb62881177 745 on at
    Re: PowerApps Image

    Hi @EricRegnier , Thank you for your patience and help in resolving this issue.

  • Caleb62881177 Profile Picture
    Caleb62881177 745 on at
    Re: PowerApps Image

    @EricRegnier 

     

    My button's expression

    button.jpg

     

    My "UploadedImage1" expression

    image.jpg

     

    I hope this helps

  • EricRegnier Profile Picture
    EricRegnier 8,705 on at
    Re: PowerApps Image

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

  • Caleb62881177 Profile Picture
    Caleb62881177 745 on at
    Re: PowerApps Image

    @EricRegnier 

    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.

  • EricRegnier Profile Picture
    EricRegnier 8,705 on at
    Re: PowerApps Image

    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.

  • Caleb62881177 Profile Picture
    Caleb62881177 745 on at
    Re: PowerApps Image

    Hi @EricRegnier, Sorry, "currUsers.mail" is "Office365Users.MyProfileV2().mail". "currUsers.mail" is a variable I use on the OnStart on the app.

  • EricRegnier Profile Picture
    EricRegnier 8,705 on at
    Re: PowerApps Image

    It's looks ok. My only question is what is "currUsers.mail" in your first expression? Shouldn't this be "Office365Users.MyProfileV2().mail"?

  • Caleb62881177 Profile Picture
    Caleb62881177 745 on at
    Re: PowerApps Image

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

     

  • Verified answer
    EricRegnier Profile Picture
    EricRegnier 8,705 on at
    Re: PowerApps 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!

  • Caleb62881177 Profile Picture
    Caleb62881177 745 on at
    Re: PowerApps Image

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard

Featured topics