web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Import Button in Canva...
Power Apps
Unanswered

Import Button in Canvas App

(0) ShareShare
ReportReport
Posted on by 119

Hello everyone,

 

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

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-export-import

 

but there is an error pops up as follow
Capture.PNG

 

What could cause this error?

 

Thanks in advance

 

---

update:

 

an error example has been given in attachment

Categories:
I have the same question (0)
  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @CaiChicken 

    checkout the example at the bottom of the docs article: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-export-import#example

    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! 🙂

     

    Regards

    Marvin

  • CaiChicken Profile Picture
    119 on at

    Capture.PNG

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

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    HI @CaiChicken ,

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

  • CaiChicken Profile Picture
    119 on at

    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:
    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-export-import#example

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

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    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.

     

  • CaiChicken Profile Picture
    119 on at

    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?

     

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    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?

  • CaiChicken Profile Picture
    119 on at

    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 😞

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    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.

  • CaiChicken Profile Picture
    119 on at

    @WarrenBelz 

    Hi, sorry yesterday I was busy with something else.

     

    This is a test app I made just for export-import button, it uses FakeData.xlsx as data source, 
    This data.zip is downloaded from export button.

     

    It looks okay when you write the code, but pops up error as soon as you use it.

     

    Sorry to disturb you again.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard