---
title: "How to use data from an original survey into a cloned one??"
url: "https://openforis.support/questions/539/how-to-use-data-from-an-original-survey-into-a-cloned-one"
tags: ["collectearth"]
status: "answered"
score: 0
answer_count: 5
asked: "2016-05-19T22:58:09"
last_activity: "2017-03-30T10:24:08"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# How to use data from an original survey into a cloned one??

Asked by Tesfay on 2016-05-19

Hi Team,

Can you add a new registers into completed grid and export to Collect Earth, yet recognize that the grid is completed? 

To elaborate, my survey didn't have region attribute. Now, I added the region attribute, and re-exported a clone of it. But it doesn't recognize that the plots are already filled!!

The data should have already been in the database and when I load the original CEP file the data seems to be there.


## Answer (score 0, by Open Foris on 2016-05-19)

Link: https://openforis.support/questions/539/how-to-use-data-from-an-original-survey-into-a-cloned-one/541

Hi Tesfay, 

When you clone a survey the cloned Survey's internal ID ( its URL ) will be different than the original one. 

This means that the data that belongs to the original survey is not visible to the cloned one as the survey  uses the internal ID to reference the records on the database.


A possible solution is that you :

 1. Export the data from the **original survey** by using the XML(Zip) format ( you need to be using the original survey, open the original CEP file) In the CE menu ***Tools->Data Import/Export->XML Export->Export data to XML(compressed)***

 2. Open the **ZIP file** generated and update the file called **idm.xml** so that the URI matches the URI that you can find inside the **placemark.idm.xml file inside the cloned CEP file**. 

This line looks like this: 

   `<uri>http://www.openforis.org/idm/NAME_OF_SURVEY</uri>` 

Again, you can find the **URI of the newer (cloned) survey if you open the placemark.idm.xml** file inside the CEP file (you can open the CEP file or WinZIP or similar, or you can try to change the extension to ZIP)

 3. Import the updated ZIP file through Tools->Data Import/Export->Import new records using XML


That should work!


So basically, in brief, you are exporting the data from the original survey and importing it into the new one. BUT for this to work you need to make sure that the URI and name of the project (which is specified in the idm.xml file) are the same than in the new one that you have currently loaded in Collect Earth (the newer cloned one)

**AS A GENERAL NOTE :** When you import data from an XML(ZIP), the data will only be imported if it refers to the same survey (in this case the newer cloned one) than the survey that is CURRENTLY loaded (in use) in Collect Earth


## Answer (score 0, by teon on 2017-03-28)

Link: https://openforis.support/questions/539/how-to-use-data-from-an-original-survey-into-a-cloned-one/1198

I have tried the above answer but its not working. What could be the problem?


## Answer (score 0, by Lauri (OF) on 2017-03-29)

Link: https://openforis.support/questions/539/how-to-use-data-from-an-original-survey-into-a-cloned-one/1200

A kind request for the Team:

could you please develop a small utility program to facilitate the use of data with cloned surveys? That should work both with exported Collect Earth (.cep) and Collect (.collect-data) files. All what is needed are these two questions:

 - XML export file to be cloned?
 - New survey name?

Output is the cloned XML. Playing with updated zip files is sometimes a bit frustrating.


## Answer (score 0, by Stefano (OF) on 2017-03-30)

Link: https://openforis.support/questions/539/how-to-use-data-from-an-original-survey-into-a-cloned-one/1201

**@Tesfay**:  
If you needed to add a new attribute to your existing survey, you could do it without cloning the survey. Adding new attributes won't affect existing data, like for example changing labels and validation rules. Usually there can be problems only if you delete an attribute (you will loose all the associated data) or you convert an attribute from one type into another. By the way, it would be better to **publish** the survey before starting to collect data with it, so when you will try to update it, only little changes will be allowed by the survey designer.      

**@Lauri**:  
In general a cloned survey can even be not compatible with the original one, because it can contain attributes converted from numbers to text or something else, and then importing data among the 2 is not always possible.  
But I like your idea; maybe it's easier to just give the possibility to the user to specify during data export if:  
 - is it for a cloned survey?  
 - (if the previous answer is *yes*) please specify it's name  
  
 And then the user will have to import the data into the cloned survey (Collect will check if the data is still compatible with the cloned survey during data import).  
Does it fits your needs?   

Thanks,  
Open Foris Team


## Answer (score 0, by Lauri (OF) on 2017-03-30)

Link: https://openforis.support/questions/539/how-to-use-data-from-an-original-survey-into-a-cloned-one/1202

Dear Team,

this new data export feature would be a good solution, thanks!

-Lauri
