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

Upload photo and save text in to Excel from Power app

 

 Tablename.png

Drive: One drive for business

Data connection: Excel file

Table name : ImageTable

 

 

 

 

To select the media file I am using : AddMediaWithImage1 control

Collect button: Collect(colpictxt,{Imageup:AddMediaWithImage1, Textinp:TextInput1.Text})

Adds the textbox and image to the collection

Collections.png

 

 

Submit button :

Patch(ImageTable,Defaults(ImageTable),{Imageup:colpictxt.Imageup},{Textin:colpictxt.Textinp})

Adds the image assets and the text into the Excel sheet.


But I get an error saying “ The type of this argument “Imageup” does not match the expected type ‘Image’.Found type Table

 

I can insert the text in to the excel file

This works

Text submit button:

Patch(ImageTable,Defaults(ImageTable),{Textin:TextInput1.Text})

 

screen.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @tartutic07 ,

Do you want to upload image to excel?

You have three points that need to be paid attention to:

1)the patch syntax should be:

Patch(table,Defaults(table),{field1:....,field2:...})

2)If you want to update all the data in a table to another table, you need to use ForAll function.

3)the image column's name in excel should be like:

fieldname[image]

 

So you need to do two things:

1)rename your image column to :  Imageup[image]

2)the patch formula should be like this: 

ForAll(colpictxt,Patch(ImageTable,Defaults(ImageTable),{Imageup[image]:Imageup,Textin:Textinp}))

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yutliu-msft
Community Support
Community Support

Hi @tartutic07 ,

Do you want to upload image to excel?

You have three points that need to be paid attention to:

1)the patch syntax should be:

Patch(table,Defaults(table),{field1:....,field2:...})

2)If you want to update all the data in a table to another table, you need to use ForAll function.

3)the image column's name in excel should be like:

fieldname[image]

 

So you need to do two things:

1)rename your image column to :  Imageup[image]

2)the patch formula should be like this: 

ForAll(colpictxt,Patch(ImageTable,Defaults(ImageTable),{Imageup[image]:Imageup,Textin:Textinp}))

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hii ,

Sorry for the late reply.

I tried the ForAll solution.

 

 

I got an error saying "The requested operation is invalid. Server Response: A value must be provided for item" 

I checked the column is formatted as text (as that was one solution in the forum).

 

Untitled.png

 

 

I have also tried Imageinp[image] in the functions bar , i get the same error

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,019)