Import Definitions
  • 3 Minutes to read
  • Dark
    Light
  • PDF

Import Definitions

  • Dark
    Light
  • PDF

Article summary

Import Definitions provides access to a project's history - this is an automatic record of all permanent changes that have been made to the project's data, including:

  • reports
  • templates
  • datasets
  • dataset collections
  • tables
  • fields
  • configuration settings

{TODO: Video Project History}

Starting a new Project History

Project history recording begins automatically when a project is created, and records actions regardless of how they are executed.   Project history records actions from:

  • Run-time scripts
  • Stored scripts
  • Interactions with the User Interface
  • Remote Execution 

(See Introduction to Scripting for more details on different types of script execution.)

Drop Project
The only action not recorded in the project history is the "Drop Project" command.   Drop Project causes the existing history to be stored in the history archive, and a new project history to begin.
Execution History
To see a record of execution history (i.e., individual script editor runs, or history from a particular script, stored script or project) see one of the following:


Accessing Project History

Project history is accessed via Script Editor | File | Import Definitions.   This will open the Import Definitions dialog.  By default the history for the current project (i.e., the project name in the Project Box) will be displayed.   

If the project box is empty, no history file will be selected when the Import Definitions dialog opens.  To view the history file, first select a project.

Current Project and Open Project
There is an important difference between "The Current Project" and "The Open Project".

"The Current Project" is the project name displayed in the Project Box and is the target of scripting methods:

This may be different to the Open Project, which is the project currently open in the Project Explorer:

TIP: To set the Open Project as the Current Project, right-click in the Project Box and choose "Select Current"


Select a method to see the detailed JSON of the executed method.

Failed Methods
The Project History only records methods that were successfully executed and resulted in a change to the project data.  If a method failed to execute, it will be recorded in the Execution History or History but not in the project history.


Importing Definitions

A common use-case for the Project History is to add executed methods to a new or existing script.   This allows the analyst to follow their train of thought whilst exploring data and later add to script any actions that are necessary to keep or reproduce.

Techniques for building scripts:
There are many other techniques for building scripts, including:
  • Script Recording
  • Copy and Paste from Execution History
  • Dropping existing objects from the Project Explorer onto the open script
  • Adding Scripting methods from Script Editor | Methods menu
  • Copy and Paste from Supplementary Viewer

{TODO: Video  Techniques for building scripts}


Selecting and Deselecting Methods

{TODO: Video selecting and deselecting)

Select

Multiple options are available for helping with the selection of methods:

  • All - selects: all methods in the current history
  • Reports - selects: SaveReport, Save Standardized Report (AddToCollection)
  • Datasets - selects: SaveDataSetCollection, SaveDataSet
  • Existing Entries - selects: methods that exist in the currently open script

Deselect

  • All - Deselects all methods
  • Deletes - deselects: DeleteField, DeleteFields, DeleteTable
  • Superseded Entries - if the same method-name pair exists more than once in the script, all but the last instance of the method-name pair will be deselected
  • Existing Entries - deselects any method-name entries that are in the currently opened script


Viewing History for different, dropped and archived projects

Project History is accessible for all projects on the active realm (including those that have been dropped)

Open Project

To view project history for the open project (the project visible in the Project Explorer) do one of the following:

  • Set Current Project in Scrip Editor: 
    1. In Script Editor, set the Current Project to be the Open Project by right-clicking in the Project Box and choosing Select Current
    2. Choose File | Import Definitions
  • Select Project in "Select Project" drop down
    1. Select desired project from the Script Editor | File | Import Definitions | Select Project combo box

Current Project

To view project history for the current project (the project name in the Project Box) do the following:

  • Choose File | Import Definitions

Dropped or archived projects

Whenever a "DropProject" method is executed, the current history for that project is moved into the project history archive.

To access archived history (i.e. history for projects or version of projects that no longer exist), use the archive dropdown:

Saving History Files

To save a project history to file, use the File | Save Selected option.



Was this article helpful?

What's Next