cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SKH19
Level 10

Patch Image to CDS

Hey all,

I had a Patch that suddenly stopped working. Basically it was an image field in CDS that had a Lookup to a main entity, so the main entity had a gallery of related photos that were taken with a camera control.

The images were stored using a button that saves the collection using the formula:

 

ForAll(colPhotos, Patch('Equipment Pictures', Defaults('Equipment Pictures'), {cr387_equipmentphoto: Url, 'Accident Report': galleryMain.Selected, Equipment: dropPickEquipmentEdit.Selected})); Clear(colPhotos); Navigate(scrPhotoView, ScreenTransition.None)

 

Url is the image in the colPhotos collection that the camera control populates. But now it says "The type of this argument 'cr387_equipmentphoto' does not match the expected type 'Record'. Found type 'image'.

So suddenly it is reading the image field in CDS as Record type.

 

Any ideas why this broke?

2 REPLIES 2
PytByt
Level 8

Re: Patch Image to CDS

Hi @SKH19 

I dont think the url is working to save image data into the CDS. I was able to do this in my old apps with this formula: 

ForAll(CameraCollection, Patch('CDSMedia', Defaults('CDSMedia'),{ImageData: Media});

While in my CameraCollection formula:

Collect(CameraCollection, {Media:Camera1.Photo});

Feel free to adjust the formula based on your needs, and see if this helps.

Regards,

pytbyt

SKH19
Level 10

Re: Patch Image to CDS

I get an error that says Value must be between 0 and 100

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,976)