Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 24/RlKb6+zzHESAEHLNw90
Power Apps - Building Power Apps
Unanswered

Attach image or take picture on Form with Excel Table Datasource

Like (0) ShareShare
ReportReport
Posted on 22 Jun 2022 02:58:03 by 6

Hello, I have built a form (for manufacturing problem reporting) that is connected to an Excel Table. In the form there is a spot to attach a picture to illustrate the problem being described in the form. I would like users to be able to select a photograph, or use the camera to take a picture, and store that image with the record so it can be viewed on the form later. I have read some other posts but am not understanding if a Gallery is required to store the image (whether it's one or multiple), or if I can upload the picture to be stored in the excel table datasource. I inserted an "Add Picture" media control, which lets me attach a picture, but when I save the form and re-open that record to view or edit the picture is not there.

 

Can anyone help?

  • kevinK Profile Picture
    12 on 05 Jul 2022 at 04:31:49
    Re: Attach image or take picture on Form with Excel Table Datasource

    I ended up switching to a SharePoint list and used some of the built-in features (i.e. Attachments). I couldn't get the pictures to save to excel.

  • kkindness Profile Picture
    6 on 26 Jun 2022 at 22:08:08
    Re: Attach image or take picture on Form with Excel Table Datasource

    Thanks for the reply. I looked at the article that you linked, but it didn't work.

     

    If I set the image in my gallery to ThisItem.Value, it changes the data type to image. In the article linked above, it's using First(TableName).ColumnNameInExcel ... when I did this, it thinks the data type in the data table is text. When I take a picture with my app, nothing is getting saved to the column in excel.

     

    My table is named "MainTable", and the column I'm trying to save images to is called "ProblemIllustration[Image]". 

     

    When the user clicks a camera icon, it opens a new screen that has a camera control named "Camera" and a gallery  with Items = colImages. When user clicks the camera control, the OnSelect property is:

     

    Set(

    varname,

    GUID()

    );

    Collect(collimages,

    {DisplayName: varName & ".jpg",
    Id: varName & ".jpg",

    Value: Camera.Photo

    }

    );

     

    This captures photos taken by the Camera into the colImages gallery. But nothing is going to the Excel table.

     

    The intent is for images captured by Camera to show in colImages, and be written to the ProblemIllustration[Image] column in MainTable.

     

    Maybe I missed a step?

  • ArchitectMadhan Profile Picture
    1,580 on 22 Jun 2022 at 07:32:00
    Re: Attach image or take picture on Form with Excel Table Datasource

    Hi @kkindness ,

     

    You can have a image control in the Gallery, which will get the path of the image dynamically from the OneDrive. The image files has to be uploaded to OneDrive and store the path in your excel sheet. As you are using the excel sheet content as data source for your gallery it will not be a problem for you.

     

    Ref: https://powerusers.microsoft.com/t5/Building-Power-Apps/Save-and-display-saved-pictures-with-excel-on-onedrive/m-p/1373652

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 10

#2
LC-26081402-0 Profile Picture

LC-26081402-0 6

#3
EE-04041031-0 Profile Picture

EE-04041031-0 4

Overall leaderboard
Loading started