We just added a new article demonstrating how to import and export collection data.
We’d appreciate any feedback on whether or not the article helped you import and export your collection data.
We just added a new article demonstrating how to import and export collection data.
We’d appreciate any feedback on whether or not the article helped you import and export your collection data.
I successfully used the example. Worked just fine.
I am having trouble with this, novice coder here. ‘It says parameter event is never used’. I’ve tried previewing the website, pasting in the JSON, then clicking Import. Nothing Happens.
What am I doing wrong here?
do you see any errors in the console?
When I scroll over the yellow ! sign it says “Parameter ‘event’ is never used”. That’s it
David, check the properties on the import button. depending on what sequence you did what, the name of the onclick event might be different. Mine is importButton_onClick_1 as an example I think because I added it after I added the onclick function code in the code section. just double check to be sure it’s the same. And the error where it shows a warming with error shown in red doesn’t matter. So ignore it.
The code was correct, the JSON file I was trying to upload was too large. Easy mistake. Thank you for the notes!
I have used this successfully. I have created a button on the form so that when I have copied the data it will take me straight to the conversion site.
After you export the information from your collection then what? Is their a way to convert it into a excel file?
After you export you should have a large JSON object that you can use to create an Excel file. The article points you in the direction of some online tools that will do this for you.
Ok thanks.
Pam, Did you write code to write out the file, before you transferred to the convert tool? or did you just copy and past into the box instead of navigating to the file? If you wrote the file from your code, I’d appreciate the sample.
Need Help please About programming Import export JSON file buttons. What’s wrong with my code ? I have a lot of errors !?
Looks like the elements on your page do not have the same IDs as the elements in the article. It seems like you just kept the default IDs. Use the Properties panel to change the IDs of the page elements to match the IDs in the article.
Ok I found ID propreties of elements ! In article wich line is ID ? Have to change User input Box ID or buttons ID ?
First, it looks like you have textbox and collectionInput mixed up. Also, it looks like you don’t have the names for the button onClick event handlers wired properly. You need to make sure that the names in the code panel match the names in the properties panel.
Hi Sam, thank you, I understood, it’s working! I made some tests … Export display a straight Line into TextBox. So I convert the export result to XLS and then take the converted XLS result to convert again to JSON and this re-converted JASON format to test import. When pasting this re-converted JSON into TextBox, the paste result has not the same straight line display like the Export action !! Is it normal ? because once imported it created new fields in the native Database collection, In my head it was suppose to write datas into existing fields and not create new one !
HI SAM, When importing JSON how to replace (overwrite) all existing fields (datas) by the new Import datas ?
Hey Ron,
You could write some code using the wix-data API to delete all the existing data.