cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PowerDAX
Level: Powered On

Import / Export Controls

There is not much documentation around import/export.

 

1. Export Tutorial - 

    - I create a button to collect the Product data:  On Select = ClearCollect(Product, {Name:"Soap", Price:"30"}, {Name:"Powder", Price:"20"}, {Name:"Cream", Price:"50"})

    - I create a button to export the data (Data = Product)

    - I click the button to populate the collection - this works and I can see the data in the collection.

    - I click the export button and receive the error

    Is there something I am doing wrong?

 

2. What format is the export? (zip file? - what is contained in the zip file?)

 

3. What format is the import expected to be in? (zip file? - what is contained in the zip file?)

 

4. How do I export the full list when connected to a SQL database (dbo.Test)? (use Data = '[dbo].[Test]'?)

 

5. How do I export search results?

 

6. How do I export a single record from the detail page? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Import / Export Controls

Hi PowerDAX,

 

When you click the Export button, what error message do you get? I do the Export action using the same steps with you, but I don’t get any error message. My steps for a reference:
-Add a button, set its Onselect property as: ClearCollect(Product, {Name:"Soap", Price:"30"}, {Name:"Powder", Price:"20"}, {Name:"Cream", Price:"50"}).
-Run the button, and data is shown in the Collection as below:

collection1.PNG
-Add an Export button, set its Data property as “Product”. On Preview mode, click the Export Data. Then a “Save as” dialog would be shown. From the dialog we know that the file type is Zip. Then click the Save button, it would be saved in the local.

collection2.PNG

 

About what is contained in the Zip file, a screenshot would be helpful for understanding:

collection3.PNG


When we Import data, a Zip file would be asked. It should be the same with the Export data.

 

To export a full list of SQL database, the Export steps should be the same with a Collection. Please have a try.

 

To export Search results, you could use a function looks like this: Collect(SearchListF,Search(listF,"","Title")). Then add an Export button to export data to local.

 

To export a single result, you could use a Lookup function looks like this: ClearCollect(SingleListF,LookUp(listF,Title=TextInput1.Text,number)). Then add an Export button to export data to local.

 

For more details about Search and Lookup function, please see this article for a reference:
https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/

 

Please free reply if you need more help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
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

5 REPLIES 5
Community Support Team
Community Support Team

Re: Import / Export Controls

Hi PowerDAX,

 

When you click the Export button, what error message do you get? I do the Export action using the same steps with you, but I don’t get any error message. My steps for a reference:
-Add a button, set its Onselect property as: ClearCollect(Product, {Name:"Soap", Price:"30"}, {Name:"Powder", Price:"20"}, {Name:"Cream", Price:"50"}).
-Run the button, and data is shown in the Collection as below:

collection1.PNG
-Add an Export button, set its Data property as “Product”. On Preview mode, click the Export Data. Then a “Save as” dialog would be shown. From the dialog we know that the file type is Zip. Then click the Save button, it would be saved in the local.

collection2.PNG

 

About what is contained in the Zip file, a screenshot would be helpful for understanding:

collection3.PNG


When we Import data, a Zip file would be asked. It should be the same with the Export data.

 

To export a full list of SQL database, the Export steps should be the same with a Collection. Please have a try.

 

To export Search results, you could use a function looks like this: Collect(SearchListF,Search(listF,"","Title")). Then add an Export button to export data to local.

 

To export a single result, you could use a Lookup function looks like this: ClearCollect(SingleListF,LookUp(listF,Title=TextInput1.Text,number)). Then add an Export button to export data to local.

 

For more details about Search and Lookup function, please see this article for a reference:
https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/

 

Please free reply if you need more help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
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

Jowiko
Level: Powered On

Re: Import / Export Controls

I noticed that the import function does not work from the documentation

 

"In a new or existing app, add an Import control, name it MyData, and set its OnSelect property to this formula:
Collect(ImportedProducts, MyData.Data)"

The formula results in an error that Collect has some invalid arguments, and does not work.

 

I like the idea of being able to export data into packages like this, but being able to import them is just as good.

BrendanQ
Level: Powered On

Re: Import / Export Controls

I've struck this same problem to. You get an "Invalid Argument type" error on the file name.

 

Has anyone been able to get the Import Control to work?

BrendanQ
Level: Powered On

Re: Import / Export Controls

OK, not got it all working just yet, but this at least gets past the error above :

 

ClearCollect(ImportedData, {Data: xxxxx.Data})

 

Note your Import Control needs to be named xxxxx (eg the same as the file name in the ClearCollect statement)

BrendanQ
Level: Powered On

Re: Import / Export Controls

The above seems to just import the file as a big Data block. Still trying to work out how to expand it into the individual fields

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,492)