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 capture multipl...
Power Apps
Unanswered

How to capture multiple images and add them into created record in attachments (Sharepoint)

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I'll share more detail what am I trying to accomplish. Currently we use simple attachment control to add pictures one by one. We want to add many pictures to one record as attachment.

 

The main issue is: we want to add multiple selected items from phone gallery or use phone camera to insert multiple images with simple one click without these steps: Select attachment control, select camera, take picture and repeat.

 

It would be absolute win if we could combine below solution and could add all these gallery items in one record.

 

I saw similar solution as this: link is here

However he creates gallery and just displayes caputred images. I'd like to use that gallery and upload all images into one record (Sharepoint) as attachment.

 

Also you can look at this solution: link is here

Which is similart to first, but with power automate solution. However seems it did not worked for end-user and they stopped the thread.

 

So main question:

Is this possible and how can I accomplish it?

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Through your description, I think canvas could meet your needs.

     

    Firstly, Use canvas directly.

    Please try the steps below:

    1\ Add a camera control

     

    2\ Add a textinput control. Its function is to name the photo.

     

     

    3\ Add a button control and set its onselect property to:

    Collect(MyPics,{DisplayName:TextInput1.Text,Value:Camera2.Photo,Id:"4"})

    Its function is to collect your photos.

     

    4\ Set the Items property of the DataCardValue (attachments’ card) to:

    MyPics

    v-xiaochen-msft_0-1611040239806.png

     

     

    5\ The result is as follows:

    v-xiaochen-msft_1-1611040239807.png

     

     

    Best Regards,

    Wearsky

    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Community Power Platform Member Profile Picture
    on at

    Hello,

     

    Thank you, however as I try to submit my form there is nothing in my record:

    Instead of

    Collect(MyPics,{DisplayName:TextInput1.Text,Value:Camera2.Photo,Id:"4"})

     I have used:

     

    Collect(MyPics,{DisplayName: Text(Now(), "[$-en-US]yyyy_mm_dd_hh_mm_ss") & ".png",Value:Camera1.Photo,Id:"4"})

    My confirm button does only one thing just submits form:

     

    SubmitForm(Form1); Navigate(Menu);

     

    When form is submitted I don't see any record in attachments:

     

    2021-01-19 13_34_19-INHUS Gaminių kokybė - Saved (Unpublished) - Power Apps.png

     

    This is record I receive:

     

    2021-01-19 13_36_24-INHUS Gaminių kokybė - Check List - Visi elementai.png

  • v-xiaochen-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Since I did not have a camera at the time, I used the add picture control to do a test for you.

    I found that the image uploaded by add picture control has the format of appres://, but the format of the photo is base64.

    So you got empty attachment.

    If you use the camera control, I am afraid it will be difficult to meet your needs only using canvas .

    I suggest you create an instant flow and add it to the canvas.

     

    I did a test for you:

    1\ Build an instant flow. Its function is to add photo attachments cyclically.

    164.PNG

    Initialize variable value: ask in powerapps // Its function is to get the ID value of the record you want to update or create

    165.png

    Initialize variable value2 : ask in powerapps // Get photo information in the collection

    166.png

    Schema:
    
     {
    
     "type": "array",
    
     "items": {
    
     "type": "object",
    
     "properties": {
    
     "Test": {
    
     "type": "string"
    
     }
    
     },
    
     "required": [
    
     "Test"
    
     ]
    
     }
    
    }

    167.png

    Id: int(triggerBody()['Initializevariable_Value'])
    
    File Name: rand(1,1000) .png // As long as the attachment name is not repeated. The formula is just for testing, it may repeat.
    
    File Content: dataUriToBinary(items('Apply_to_each')['Test'])

     

    2\ Build your canvas app. Add a camera control and add a button control.

    Set the onselect property of the button control to:

    Collect(AAA,{Test:Camera1.Photo}) // This is used to collect photos

     

    3\ Add a button control. Add flow to it and set its onselect property to:

    SubmitForm(EditForm1);Set(Thevar,EditForm1.LastSubmit.ID);TEST16.Run(Thevar,JSON(AAA,JSONFormat.IncludeBinaryData)) // TEST16 is the name of my flow

    168.png

    169.png

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

     

  • Community Power Platform Member Profile Picture
    on at

    Hello,

     

    Sorry for inconvenient, however after searching for solution I just dropped on video where it said "Press on picture" and I saw that in his collection image value had image in it. So when I pressed on Camera it added values correctly and I could export it to sharepoint list as attachment, because before it had blank value.

     

    No need for any flows or etc, just to take picture press on camera, not on button.

  • Kitsu Profile Picture
    45 on at

    This works, but did you notice image resolution is useless for any real life situation, this must be addressed by microsoft.

  • Ballen1 Profile Picture
    2 on at

    Hey so I was wondering if you could show me the steps that you used to do the clear collection and the other function you had that’d be great please

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard