web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to save an image u...
Power Apps
Answered

How to save an image uploaded on a canvas app to a dataverse table

(0) ShareShare
ReportReport
Posted on by 590

Hi everyone, 

 

I hope you are all well.

I am having issues getting a lookup field and image to save from the canvas app to the corresponding table in dataverse. The expression I am using is :

 

Patch(Expenses, Defaults(Expenses), {Name: User().FullName, Types: LookUp('Expense Types', 'Expense Type Name'=ListBox1.Selected.'Expense Type Name'), amount: TextInput1.Text, 'Receipt Image': AddMediaWithImage3}); Reset(ListBox1); Reset(TextInput1);

If(IsEmpty(Errors(Expenses)),

Navigate(success),

Notify(First(Errors(Expenses)).Message));

 

However, when it saves it is saving all data as expected minus the uploaded image and the lookup field. With this in mind, I am hoping one of you can point me in the right direction, I have spent the day searching various posts but so far nothing has worked.

I have the same question (0)
  • Verified answer
    JohnM86 Profile Picture
    590 on at

    Morning all, 

     

    I have managed to get the image to save now with:

     

    Set(_addfile,JSON(Image16.Image,JSONFormat.IncludeBinaryData));Set(_base64File,Mid(_addfile,Find(",",_addfile)+1,Len(_addfile) - Find(",",_addfile)-1)); Set(_upload,false);Patch(Expenses, Defaults(Expenses), {'Receipt Image':{Value:Image16.Image,Full:Image16.Image}, Name:User().FullName, Types: LookUp('Expense Types', 'Expense Type Name'=ListBox1.Selected.'Expense Type Name'), amount: TextInput1.Text}); Reset(ListBox1); Reset(TextInput1);

    If(IsEmpty(Errors(Expenses)),

    Navigate(success),

    Notify(First(Errors(Expenses)).Message));

     

    However, the only issue is still the value from the lookup field

  • Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hello @JohnM86 

     

    Please mark it as solution, that will help the community. 🙂

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

     

     

     

  • JHS2019 Profile Picture
    30 on at

    Can you display how you have added in the app?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard