Power Apps add attachment or take picture with camera in a bulk edit table

235 views Asked by At

I have a canvas app that I need to add a set of records and commit them all at once.

So to do this, I have created a collection on Startup with a schema that matches a table I've created in the DataVerse.

ClearCollect(BulkData, 
{
  Column1: "", 
  Column2: ""
});

I have have an add button that adds to the collection, and a gallery with the collection as a datasource.

Collect(BulkData,{Column1:"",Column2:""})

When the values of my controls change, I merge them into my collection using the OnChange event.

Patch(BulkData,ThisItem, {Column1: txtCol1.Text})

I have a save button that copies my entire collection into the dataverse table

Collect(MyDataVersetable, BulkData)

Now what I need to do is allow the user to either add an attachment (pdf, or image) OR take a picture with their camera.

I have seen a way to add an edit form based on a dataverse table that will add an attachment control if the field has an attachment field. I'm just not sure how to link that up to my in memory collection, and I'm not sure how to allow the use of either an attachment or an image from the camera, but not both and put their values in the same field. Any advise appreciated...

0

There are 0 answers