cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dan007
Frequent Visitor

Uploading Image to Dataverse Image collumn with PowerApps Collect function

Hello,

 

I'm trying to make an app that uploads a picture (either by selecting on pc or by taking one on phone) to a Dataverse Image Column.

 

My Table is setup as follows :

Screenshot_3.jpg

The collect function gives me this error :

Screenshot_5.jpgScreenshot_4.jpg

 

 

Collect(
    Decla_Unifieds, //my table
    Defaults(Decla_Unifieds),
    {
        cr38d_typedactions : ch_action.Selected.Result, //another column I'm writing to
        cr38d_photo1 : UploadedImage1.Image //image from "Add Picture"
    }
)

 

 

"The given types are incompatible"

 

What am I doing wrong ?

1 ACCEPTED SOLUTION

Accepted Solutions
Prakash4691
Super User
Super User

Hi @Dan007 ,

Formula which you have incorporated is wrong for collect function. For 'Item' parameter either you have to pass existing item or new. Existing item, you can use the item selected from browsegallery.

Collect(Myt, BrowseGallery1.Selected)

If it is for new, try below snippet.

Collect(Myt, Patch('Test 1S', Defaults('Test 1S'), {'img type': Image1.Image})).

And for collection parameter it can be either datasource or you can give any name where it will create temporary collection in your local.

 

If it answers your question, kindly give kudo and accept it as solution.

 

Regards,

Prakash

View solution in original post

1 REPLY 1
Prakash4691
Super User
Super User

Hi @Dan007 ,

Formula which you have incorporated is wrong for collect function. For 'Item' parameter either you have to pass existing item or new. Existing item, you can use the item selected from browsegallery.

Collect(Myt, BrowseGallery1.Selected)

If it is for new, try below snippet.

Collect(Myt, Patch('Test 1S', Defaults('Test 1S'), {'img type': Image1.Image})).

And for collection parameter it can be either datasource or you can give any name where it will create temporary collection in your local.

 

If it answers your question, kindly give kudo and accept it as solution.

 

Regards,

Prakash

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,294)