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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Cannot get Import cont...
Power Apps
Unanswered

Cannot get Import control to work

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have successfully set up an Export control to save the contents of a collection to a file. However, I am unable to work out the correct way of configuring an Import control to get this data back into a collection which can be used in the app.

My control is called impImportData and I have tried using the following code in the OnSelect property of the Import control itself and a separate button:

 

 

ClearCollect(colImportedData,impImportData.Data)

 

 

Whatever I try, I just get the error 'Invalid argument type' with the predominant red squiggle under the .Data part of the code. I have tried using impImportData.Data as a source for a DataTable but it complains that it is not being passed a Table. It seems therefore that the data is not being imported as a Table.

I have looked at the documentation for these controls but it isn't very detailed. I don't believe I have done anything that different to the example given. https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-export-import 

Has anybody been able to get this working successfully in their own apps? Any pointers would be appreciated.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    Hi @Anonymous ,

    You have not said what your data source is, however the relevant table name will appear under View > Data Sources

    You are trying to import the control rather than the data. I will call the name of your data source as it appears in this list MyData

    To collect this data (assuming there re less than 2000 records)

     

    ClearCollect(colImportedData,MyData)

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for your response, but I think you've misunderstood as I'm not trying to collect data from a Data source. I'm trying to use the Import control to import data from a zip file (as created by an Export control). These files contain a few json files and allow you to export and import Collections between apps.

  • eka24 Profile Picture
    20,923 on at
    Please read this post.
    https://powerusers.microsoft.com/t5/Building-Power-Apps/Import-Export-Controls/td-p/16357

    If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you. I already searched the forums and found that post, but it doesn't actually solve the problem. Taking that approach suppresses the error, but it doesn't populate a collection. When I check the contents of the collection, it is completely empty and doesn't even have a Data column.

    I can't work out what data type is returned by .Data - I think that would be a good starting point to solving this.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share a bit more about your error message?

     

    I have made a test on my side, and don't have the issue that you mentioned. Based on the issue that you mentioned, I have made a test on my side, the issue is confirmed on my side.

     

    I would post this issue to my product team, if this issue is solved, I would reply here.

     

    Best regards,

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    I have posted this issue to my Product Team already. If there are any updates from them, I would reply here. Thanks for your feedback.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-xida-msft ,

    Thank you for passing this onto the Product Team.

    I'm not sure what else I can tell you about the error, but I've attached a screenshot of it. The formula is being used in the OnSelect of my Import Data control.

    It might be that I'm just using the control wrong, but there is little documentation on it and I've followed what is there as best as I can. Any suggestions or advice would be most welcome.

    Error.png
  • JoaoN Profile Picture
    222 on at

    Any Update @v-xida-msft ??

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 84

#2
WarrenBelz Profile Picture

WarrenBelz 79 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 40 Super User 2026 Season 1

Last 30 days Overall leaderboard