The CreatorCon Call for Content is officially open! Get started here.

Import projects from xls using Import data sets and Transform map

ashwinipingle
Tera Guru

Dear all PPM experts,

I am using Vancouver version and trying to import projects from xls (template downloaded from servicenow)

I am uploading projects from 2 lists (i.e. 2 different xls) - first is parent project list xls. The second is sub project list xls. I have all the correct unique names of parent projects in a column on subproject list xls. After loading parent projects, i am trying to import sub projects. For setting the parent, i am using a transform script onBefore. So i expect that for each record, the parent is set, however it is not getting properly set. In the project list, when we check the subprojects, the Parent column should show the Project Number, however in my case it shows the project name. On clicking this project name (which is correctly showing the parent project name), it does not actually open the project. 

// Add your code here
    var projectName = source.u_parent;
    gs.info('Parent projectName: ' + projectName);
    var project = new GlideRecord('pm_project');
    project.addQuery('short_description', projectName);
    project.query();
    if (project.next()) {
    source.parent = project.sys_id;
    gs.info('Parent sys_id: ' + project.sys_id);
    gs.info('Parent project number: ' + project.number);
    }
3 REPLIES 3

Appanna M
Tera Guru

@ashwinipingle ,

 

Can you elaborate your requirement with an example here?

Hello Appanna,

I have attached the screenshot with explanation. The imported projects do not correctly set the parent project link. 

BR,

AP

I have attached the data i am using for importing. The attached xls are templates downloaded from servicenow itself for pm_project table. check_p is parent project and check_1 contain sub projects.

 

BR,
AP