Renaming analytics and scripts
You can use the script editor to rename individual analytics or scripts if you have “Full permissions” for the analysis app or Analytics project. Names must be unique within the project. Using the script editor, you can rename both an analytic’s name, specified in the analytic header, and its script name, which appears in the script editor’s Project Explorer. When you rename an analytic in the treeview, you can rename only the analytic’s name.
Exercise care when renaming scripts. If script dependencies exist, renaming a script without updating the name wherever the script is referenced can cause other scripts or analytics to fail.
To rename an analytic or script:
- Select the analytic, or the analysis app or Analytics project
containing the analytic or script, you want to rename.
Tip:
For analysis apps containing multiple analytics, select the analysis app if you want the script editor to automatically open all the analytics in the analysis app.
- Do one of the following:
Select .
Right-click and select Edit Scripts.
The script editor opens.
- If you want to rename an analytic script name, or a script,
in the Project Explorer select the appropriate
analytic or script and do the following:
- Select , or right-click and
select Rename.
The name is highlighted as editable text.
Note:Analytic script names appear in the Project Explorer. Analytic names appear in the analytic header at the top of the analytic script itself.
- Type the new name for the analytic script, or script,
and press Enter.
Spaces and special characters are invalid in script names and are automatically replaced by the underscore character (_).
- Select , or right-click and
select Rename.
- If you want to rename an analytic name, do the following:
- If you have just renamed the analytic script
name, and you do not want to replace the existing analytic, or delete
its input values and schedules, click Save All
.
If you change both an analytic’s script name and its name prior to clicking Save All, the existing analytic is replaced by the renamed analytic, and the existing input values and schedules are deleted. If you intend to replace the existing analytic, do not click Save All at this point. For more information, see Options when renaming analytics.
- If necessary, double-click the analytic in the Project Explorer to open it, or to switch the focus to the appropriate tab.
- Modify the name that appears after the ANALYTIC tag.
For example: //ANALYTIC <new name>
CautionCharacters that cannot be used in Windows filenames (< > : “ / \ | ? *) should not be used in analytic names, because they will cause an error that prevents the export of analytic results.
- If you have just renamed the analytic script
name, and you do not want to replace the existing analytic, or delete
its input values and schedules, click Save All
- Click Save All
.
- If you are replacing an existing analytic, click OK in
the Analytic Removed dialog box.
The existing analytic is replaced by the renamed analytic, and the existing input values and schedules are deleted.
- Select to close the script editor.