Project Center Tenth Edition Help  

 

Batch Create Multiple Projects

Use this procedure as a guideline for batch importing projects into Project Center. Two templates are required to batch create projects - a project template and a master template.

1   You must be a Project Center administrator to perform this procedure.

1. Create a project template

1   The syntax for the project template is located in C:\Program Files\Newforma\Tenth Edition\Project Center\Templates\Project Template.xlsx.

        Create a project in Project Center using the Create Project dialog box using your company's standards.

        After the project is created, export it to a template.

        Embed SQL queries into the template using special <sql connection> and <sql table> template tags. For more information on SQL queries, see Embed SQL Queries in Project Center Templates. SQL queries are not mandatory.

        The project template contains:

        Generic project settings tailored to an organization.

        SQL queries to retrieve data from a data source. SQL queries are not mandatory.

2. Embed SQL queries in the project template (optional)

        Add <sql connection> and <sql table> tags to your project template. An example of what the <sql connection> and <sql table> tags should look like can be found in the SQL Grammar tab in C:\Program Files\Newforma\Tenth Edition\Project Center\Templates\SQL Template.xlsx.

        Create a connection string in the <sql connections table> with the correct database host and username and password to connect to the database.

        Create SQL queries in the <sql table>. Any parameters that are needed can be added in the columns starting at the <p0> tag. Identify that a parameter is required by adding a ? to your SQL query where the parameter should be substituted. You can add references to other cells as values for the parameters.

3. Create a master template

The master template is used for batch project creation in four different modes:

1   The syntax for the master template is in C:\Program Files\Newforma\Tenth Edition\Project Center\Templates\Batch Project Creation Template.xlsx.

        <template table>

        This is a list of static project templates from which to create projects. The referenced project templates typically do not have embedded SQL within them and are constructed manually.

        <defaults> + <template table>

        This is a list of static project templates from which to create projects. The templates themselves can share common settings in a static defaults template. The referenced project templates typically do not have embedded SQL. However, they are simpler than those found in the <template table> option above in that most settings have been moved to a common defaults template.

        <defaults> + <overrides table>

        This is a list of property values to override in the defaults template. Each row results in a project template to create projects from. This mode is intended for embedded SQL queries in the defaults template. However, SQL queries are not mandatory in this mode.

        The overrides table is used for overriding specific properties within the defaults template during batch project creation. The overrides table can only override single-value template properties. Table (multi-value) template properties cannot be overridden using the overrides table. For example, it is possible to override the <project number>, <project name>, <primary project folder>, and other similar properties using the overrides table. It is not possible to override the <xref path table> or other multi-valued properties using the overrides table.

        <defaults> + n4 project create -k [project number]

        Similar to the <overrides table> above but only overrides the <project number> property from the command line. This mode is intended for embedded SQL queries in the defaults template.

        The master template contains:

        A reference to a default project template (above).

        A list of project numbers to import. The project numbers go into an overrides table, and other project specific information can also be added if needed.

4. Test batch project creation

1   You must test on a machine with Microsoft Excel installed.

Log into the Project Center Server. Open the Newforma Command Utility Project Center shortcut from Start > All Programs > Newforma. This launches a command line to the correct location for running N4.

Test templates one project at time using the following command:

n4 project create –t [master template.xls] -d -i -u -k [project number]

        The -t [master template.xls] flag is the location of the master template.

        The -d flag runs n4 in debug mode where a dialog box displays the results of the SQL queries.

        The -i flag executes n4 in interactive mode and displays various warning messages as popup dialogs.

        The -u flag can optionally update a project if it already exists.

        The -n [project number] flag is used to specify the WBS1 value for a project.

5. Batch create projects

1   You must run batch creation on a machine with Microsoft Excel installed.

You can specify multiple project numbers with an overrides table in the master template:

        Specify a <project number> column in the overrides table.

        Specify the project numbers for all of the projects to be created.

Log into the Project Center Server. Open the Newforma Command Utility Project Center shortcut from Start > All Programs > Newforma. This launches a command line to the correct location for running N4.

Batch create projects with the following command:

n4 project create –t [master template.xls] –i

        The -t [master template.xls] flag is the location of the master template with an overrides table specifying projects to create by project number.

        The -i flag executes n4 in interactive mode and displays various warning messages as popup dialogs.