Help required on import descriptor record in Service Manager

Hi All,

I have a need of importing data into service manager through import wizard.

For the same i have created the import descriptor record and it is working fine.

But i have requirement of ignoring to update the already existing records based on some condition on assignment field.

i could see the fields like query, skip and expression in import descriptor record, but i have a challenge in achieving the need. My need is to ignore the incident records having the assignment group like 'test group'

assignment in $file="test group".

Please help me with exact syntax/steps to update the fields query , skip in import descriptor record to meet the above condition.

Regards,

D_M_K

  • Hello,

    The import descriptor record has fields "Query" and "Skip" - these are only for update.

    For update you also need to specify the "Updated Field names" on the Advanced tab: These are the fields you want to update.

    Then to use the "Query" and "Skip" fields, you need to first extract the value of the import string and assign it to a variable:

    I.e.:

    $variable.name=substr($import.string, 1, 20)

    Then you can formulate the "Query" to identify one record to be updated.

    The "Skip" is for the case the "Query" didn't return exactly 1 record - then you can skip by setting this to true.

    ==> This means: The "Query" simply should retuen no or multiple records in case you want to skip.

     

    The help on field when looking at the import descriptor record is quite detailed with examples. Have a look here, too.

    Best regards,

    Armin

     

  • Hi Armin,

    Firstly thanks for your reply.

    May be I have not explained my requirement properly in my post.

    Currently I am using import descriptor record in service manager to import the data present in text files to service manager incident management.

    I am using two import descriptor records to serve my purpose where i have two text files one for open cases and another for closed cases.

    Import descriptor1 will be using source as textfile1 with open cases and Import descriptor2 will be using source as textfile2 with closed cases.
    Here the text files are having the data with tab seperated to distiguish the values for each field. Each line in the text file will be my single record to import into service manager as an incident.

    So i have added the fields in 'Fields' tab of descriptor record in the same order what i have in text files. And i ahve entered two fields under 'Update Field Names:' in advanced tab which are considering as primary key for me while importing the data from text files to service manager.

    Now my challenge is the values/records which are present in my text file with some specific values of assignment group need to ignored and it should not get udpated in service manager of any of the fields for that particular record and remaining records in that text file should only import.

    lets consider i have fields in my incident record as 'reference number' & 'assignment group' .
    lets say once example record which is already present in Service Manager with reference number=123 and assignment group=testgroup as values.

    And suppose in my text file if there are 3 records with assignment value as 'testgroup' out of 25 records.
    lets consider those 3 records are

    reference number=123 and assignment group=testgroup
    reference number=456 and assignment group=testgroup
    reference number=789 and assignment group=testgroup

    So while importing my text file which is having 25 records it should import/update only 22 records except the above mentioned 3 records.

    how to give the condition in query field and skip fields of advance tab, please help me with clear syntax consider the above mentioned field 'assignmet' as the field in my db.

     Also in your reply i could not see the link where we can see the detailed examples, it is missed to paste i think. Please share that too.

    Thanks again.

    Regards,

    D_M_K

     

     

  • Verified Answer

    Hi, Can you please share if your issue is resolved ? If yes then you can post the answer here, it ll help others too. If not then you can log a case with HP Software support or Professional Services for customization requests.
    Regards,
    HPE Software Support