Project and Portfolio Management Practitioners Forum
cancel

Importing User Data with End Date via XML?

Highlighted
5keeve
Valued Contributor.

Importing User Data with End Date via XML?

Hi!

 

I successfully can import user data using XML. But  how would I create an end date?

 

At the moment I get

 

Error 2: There is no field defined for the following token: [END_DATE].

 

 

And I tried different variations of something like this:

 

<?xml version="1.0" encoding="UTF-16"?>
<di:itg_dataImport xmlns:di="http://www.mercury.com/itg/data_import/1.0"
                   xmlns = "http://www.mercury.com/itg/rsc/2.0/types"
                   xmlns:common = "http://www.mercury.com/itg/common/2.0/types"
                   xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.mercury.com/itg/data_import/1.0 data_import.xsd">
  <resource>
    <userName>dummy_20140912_04</userName>
    <firstName>Dummy</firstName>
    <lastName>2014_09_12</lastName>
    <startDate>2013-11-01 00:00:00</startDate>
    <endDate>2014-11-01 00:00:00</endDate>
    <manager>admin</manager>
    <timeSheetApproverName>admin</timeSheetApproverName>
    <billingApproverName>admin</billingApproverName>
    <password>secret</password>
    <licenses>
      <license>Demand Management</license>
      <license>Project Management</license>
      <license>Program Management</license>
    </licenses>
    <security>
      <groupName>XXXgroup</groupName>
    </security>
    <userData>
      <common:token>KNTA_USERS.END_DATE</common:token>
      <common:stringValue>2014-11-01 00:00:00</common:stringValue>
    </userData>
  </resource>

</di:itg_dataImport>

 

4 REPLIES
Utkarsh_Mishra
Acclaimed Contributor.

Re: Importing User Data with End Date via XML?

I think you are trying to Import END date in User date; I would recommend that create a USERS user data field called END date with token as END_DATE.

Once users are imported then RUN the SQL to populate KNTA_USERS end_date column with the user data (end date) value
Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
5keeve
Valued Contributor.

Re: Importing User Data with End Date via XML?

So you're suggesting that there is no way to populate the real END_DATE column? I have to add redundance by introducing a second end date field which I need to copy to the real end_date field by copying over the columns value? Either I understood you completely wrong or you must be kidding me.

 

What's the benefit of this? When I have to run an sql script anyway, I can as well copy the end date to the field by an sql script without creating any redundance.

Utkarsh_Mishra
Acclaimed Contributor.

Re: Importing User Data with End Date via XML?

I repliead based on the XML and error which u have posted... It seem you are passing end date as user data.

 

 

Error 2: There is no field defined for the following token: [END_DATE].

 

 <userData>
      <common:token>KNTA_USERS.END_DATE</common:token>
      <common:stringValue>2014-11-01 00:00:00</common:stringValue>
    </userData>

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
5keeve
Valued Contributor.

Re: Importing User Data with End Date via XML?

Sorry, I still do not get it.

 

The XML was generated by the Excel Plugin. Except for the "KNTA_USERS.END_DATE" token, which I made up based on posts I found here in the forum.

 

Anyhow. In the meantime I received from HP an XML file which led me to the idea to try and import this:

 

<?xml version="1.0" encoding="UTF-16"?>
<di:itg_dataImport xmlns:di="http://www.mercury.com/itg/data_import/1.0"
                   xmlns = "http://www.mercury.com/itg/rsc/2.0/types"
                   xmlns:common = "http://www.mercury.com/itg/common/2.0/types"
                   xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.mercury.com/itg/data_import/1.0 data_import.xsd">
  <resource>
    <userName>dummy_20140924_02</userName>
    <firstName>Dummy</firstName>
    <lastName>2014_09_22</lastName>
    <startDate>2013-11-01 00:00:00</startDate>
    <manager>admin</manager>
    <timeSheetApproverName>admin</timeSheetApproverName>
    <billingApproverName>admin</billingApproverName>
    <password>SECRET</password>
    <licenses>
      <license>Demand Management</license>
      <license>Project Management</license>
      <license>Program Management</license>
    </licenses>
    <security>
      <groupName>mygroup</groupName>
    </security>
    <common:simpleField>
      <common:token>KNTA_USERS.END_DATE</common:token>
      <common:stringValue>2014-11-01 00:00:00</common:stringValue>    
    </common:simpleField>
  </resource>

</di:itg_dataImport>

 

This succeeds in importing, but fails to set the end date.

 

I simply want to know the proper XML to use in order to set the user's end date and maybe even the "New password on login" flag.