Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Import Button in Canvas App

Hello everyone,


I was adding an import button according to the official documentation:


but there is an error pops up as follow


What could cause this error?


Thanks in advance





an error example has been given in attachment


Accepted Solutions

After days of struggle, I think I have found the solution by coincident.

1. Create a Media Import Button
2. Write functions without test
4. Publish straight away
5. Test on desktop version

View solution in original post

Solution Supplier
Solution Supplier

Hey @CaiChicken 

checkout the example at the bottom of the docs article:

You tried to Clear the Collection with the "Import"-button, you should use a normal button for this action.
With the "Import"-Button you can import the exported data from the "Export"-button.

Collect(Collection_Card, Welcome_Import.Data)


Hope this will help you! 🙂





ehh...Thank you for getting back to me, change to "collect" does not really make a difference

Super User
Super User

HI @CaiChicken ,

What are you trying to collect here - this is normally a table.

Hi,  WarrenBelz


I am using the Insert - Media - Import button,

This button is for user A upload data saved by user B so that data can be shared between app users.


I found the official documentation here:

I was writing this command according to Collect(ImportedProducts, MyData.Data) in example - Step 6

Hi @CaiChicken ,

You need

Collect(Collection_Cart, Welcome_Import.Data)

You have to refer to the control name.


Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.


hi, @WarrenBelz 


Yes, I am writing as 

Collect(Collection_Cart, Welcome_Import.Data)

and it produces an error message as:

The function 'Collect' has some invalid arguments. - invalid argument type


So I was wondering is it function broken?
Or there are some other features/requirements yet not documented?


Hi @CaiChicken ,

I did some testing as below and it functions as expected, presenting a file window to select data from.ImportControl.png

Is there anything in your setup you can see different to this?

To me, the first time writing this function is correct without issue.


When I really using this from a power app desktop client, it has no response.

Switch back to Edit Mode. this error comes up.


I tested the import function on Friday and it was working fine. Monday I opened my laptop it brokes.

I even rolled back to Friday's version, still yet no luck 😞

Hi @CaiChicken,

I would like to have a solution, however it seems something intermittent and as you have stated, the code is correct.

One thing I might suggest is to delete the Import object, save and close the app and then try reinstalling it.

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,023)