- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2016 10:44 AM
I have pulled the Assigned_to.Mobile phone field to the cmdb_ci table.
While mapping a data to the cmdb_ci table, couldn't find the Assigned_to.Mobile phone field in the target. As, i have to map a phone number from sample data to cmdb_ci.
Moreover, how to map the dot-walked fields in transform map?
Can anyone help on achieving this.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 05:20 AM
Thank you Pradeep, Ashutosh and Abhinay for your timely responses.
Abhinay, i just modified the script and made it work
Here is the script:
var gr= new GlideRecord("sys_user");
gr.addQuery('name',source.u_assigned);
gr.query();
while(gr.next())
{
gr.mobile_phone=source.u_phone;
gr.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2016 01:12 PM
Can you post the script you have now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2016 01:17 PM
This is the script, i have used.
Please correct if it is wrong.
var gr= new GlideRecord("sys_user");
gr.get(source.Assigned);
gr.mobile_phone=source.Phone;
gr.update();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2016 01:24 PM
This is assuming the values in the excel sheet exactly matches with name of your sys_user records
Here is your script:
var gr= new GlideRecord("sys_user");
gr.get('name',source.Assigned);
gr.mobile_phone=source.Phone;
gr.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 05:20 AM
Thank you Pradeep, Ashutosh and Abhinay for your timely responses.
Abhinay, i just modified the script and made it work
Here is the script:
var gr= new GlideRecord("sys_user");
gr.addQuery('name',source.u_assigned);
gr.query();
while(gr.next())
{
gr.mobile_phone=source.u_phone;
gr.update();
}