Copying/Duplicating a Question
		
		
		
		Jump to navigation
		Jump to search
		
Refer to Copy and Paste Variables and Questions for methods not involving writing code.
// Working on Phone.sav, this creates an exact copy of Q2 called "Q2 copy".
project.dataFiles[0].getQuestionByName('Q2').duplicate('Q2 copy');See also
- QScript for an explanation of how to run this code.
 - QScript Examples Library for other examples.
 - QScript Reference for technical information.
 - JavaScript for information about the JavaScript programming language.
 - Table JavaScript and Plot JavaScript for tools for using JavaScript to modify the appearance of tables and charts.
 - JavaScript Variables for detail on how to create new variables in the Variables and Questions tab using JavaScript.