- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2014 10:19 AM
For a little background. On my location table I have a location number that is pulled in from Active directory as well as the location name. I went ahead and created a new field called location name in which I am pulling both the number + name into the new field (business rule: current.u_location_name = current.u_location_code + ' - ' + current.name;)
What I am looking to do is to make it so on my incident/ service requests "location" field will display the location name field instead of just the location number. When i go ahead and change the new field to be the display field= true and change the other to be false it works fine and displays correctly. Though the issue is when AD does a re-sync overnight its creating hundreds of blank records (due to what only i can assume is LDAP being confused and hence adding a blank record for every location number)
I would like to keep 'location' as the field on my incident/ request forms so people have the ability to still search for a location using the magnifying glass/ also have the quick hover display for other location details. (screenshot of the two fields attached)
I was thinking maybe a dictionary override would allow me to display the other fields value instead but am unfamiliar with them and my attempts have not worked thus far.
If anyone can give me some guidance it would be appreciated.
Steve
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2014 09:10 AM
Ok,
So, we are using a principle "We won't create/update automatically the locations from the AD" (we could and if we would, the message from Christopher Plunkett will help you)
What we want to do is:
1) I have a "location code" (named Company into my AD and u_company in my source table here in ServiceNow)
2) I want to find the right location from the location table (because I suppose the u_location_code is a reference field to the cmn_location table)
OR, on my cmn_location table, the "display" field isn't the u_location_code anymore but "current.u_location_name":
1) I want to use this "current.u_location_name" as the display name for users
2) I want to use the "current.u_location_code" for my technical import of users (from the AD)
The solution is quite simple, we will "configure" the field map rule
1) On your screenshot, please ckick on "u_company" to open the corresponding "field map"
2) On the right column, you should have a "referenced value field name", by default this field is empty and the transform map will use the display value (something we can't do anymore), so let's fulfill the field with the information we have at our disposal from the AD, the "location code"
==> Little warning, don't forget to use the "database name of the column"
Feel free to tell if you have troubles to understand the difference between the "display" column for user and this "referenced value field name"
http://wiki.servicenow.com/index.php?title=Creating_New_Transform_Maps#Creating_a_Field_Map: Putting that here btw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2014 11:20 AM
But you're creating your locations using the transform map, how do you do that?
==> Do you just have this transform map on sys_user table and a field mapping on "location" ?
If yes, could we speak about the "data transformation process":
To answer the questions, please take (at least for yourself) one example and go step by step from the AD to the "cmn_location" table (nothing is magic, if we have blank records, it's because we're missing a step)
1) What are the data you have in the AD (and you want to import)?
2) In fact, do you want to import "location" data from the AD or you just want to reuse the locations you already have on your instance?
3) What are the columns you could use into your transform map to find the right location for one user?
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2014 11:47 AM
Hopefully I answered the questions.
Target table is set for sys_user
one of my field maps is u_location_code (source field: u_company)
To answer the questions, please take (at least for yourself) one example and go step by step from the AD to the "cmn_location" table (nothing is magic, if we have blank records, it's because we're missing a step)
1) What are the data you have in the AD (and you want to import)? See below screenshot on what we are pulling in
2) In fact, do you want to import "location" data from the AD or you just want to reuse the locations you already have on your instance? We are pulling location so it is tied to the users record, any new locations pull in just the number and the rest of the data is manually entered.
3) What are the columns you could use into your transform map to find the right location for one user?
We originally started by importing a location listing xls with address' etc and then after running the transform map any location numbers that came up I added in the location details (name, address etc)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2014 09:42 PM
I'd look at running two transform maps to be honest, one to make/update the locations, and then an additional map on the user table to set set the user to the correct location and update any user info.
But, for the current issue I'm guessing if you open the field map record for the u_company source field and set the referenced value field name to u_location_code it will help.
Additionally, you can think about how to use the "choice action" dropdown option. What that says is basically, for a given user, if i'm trying to set his/her location, and the location on the import doesn't match one I found in the system, what should I do? If it is set to create (im guessing yours is), it will create a new location record (you've just seen this behavior) that is mostly blank. Ignore will leave the users location alone, and reject...I'm not sure off the top of my head but I think it aborts the whole import row.
Combining both features should get you pointed in the right direction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2014 09:10 AM
Ok,
So, we are using a principle "We won't create/update automatically the locations from the AD" (we could and if we would, the message from Christopher Plunkett will help you)
What we want to do is:
1) I have a "location code" (named Company into my AD and u_company in my source table here in ServiceNow)
2) I want to find the right location from the location table (because I suppose the u_location_code is a reference field to the cmn_location table)
OR, on my cmn_location table, the "display" field isn't the u_location_code anymore but "current.u_location_name":
1) I want to use this "current.u_location_name" as the display name for users
2) I want to use the "current.u_location_code" for my technical import of users (from the AD)
The solution is quite simple, we will "configure" the field map rule
1) On your screenshot, please ckick on "u_company" to open the corresponding "field map"
2) On the right column, you should have a "referenced value field name", by default this field is empty and the transform map will use the display value (something we can't do anymore), so let's fulfill the field with the information we have at our disposal from the AD, the "location code"
==> Little warning, don't forget to use the "database name of the column"
Feel free to tell if you have troubles to understand the difference between the "display" column for user and this "referenced value field name"
http://wiki.servicenow.com/index.php?title=Creating_New_Transform_Maps#Creating_a_Field_Map: Putting that here btw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2014 05:46 AM
David,
I am not sure I understand the reference value field 100%. You had mentioned to use the database name of the column. So I had tried putting "cmn_location.u_location_code" for the referenced value field name and it still created some blank records. Is that the correct field I should put there?
Steve.