chrishansen
ServiceNow Employee
ServiceNow Employee

Please use this article to post questions that arise during the HAM Fundamentals K18 Pre-Conference courses.

Comments
HenryBrooks
ServiceNow Employee
ServiceNow Employee

Hi Betsy, Discovery respects this.  It would create the CI but it if 'enforce CI verification' is on then the Asset would not automatically be created.

joel_maxwell
Tera Contributor

Hi Mary,

1) Assuming you are referring to Facilities Management; in some cases you can cause issues by customizing the form. For example if you removed the state field. That said, in most cases you should be OK, just will want to go into these areas before you make your changes to validate you are not removing a critical field. 

Eddie Parsa
Tera Contributor

Test

Eddie Parsa
Tera Contributor

Asset, Configuration Item or Both? Differentiating in ServiceNow

Eddie Parsa
Tera Contributor

Why is it that when you update the "Assigned to" field on the H/W (CI) form, it does not update the assignee Location on the "Asset" form. In other words it just update the "Assigned to" on the Asset form (FYI, there is an OOB client script for this)

Eddie Parsa
Tera Contributor

What would you suggest if the requirement calls for having a "shelf location" within the stockroom must be known when selecting an item from a given stockroom...This is a twist to the requirement: (1) The item is a consumable asset (2) and due to some illogical reason, it may be housed/located on more the one shelf within a given stockroom.

daverottman
Tera Explorer

I love requirements created by illogical reasons

joel_maxwell
Tera Contributor

Hi Eddie,

I'm assuming you are referring to the "Location" field. There is a client script called "Set Loc/CC/Dep/Com from assigned to" which will set the location, department, etc. IF the field is defined/set for the assignee's (user in the sys_user table) record. So if it is not set when the Assigned To is set, it is probably because the Assigned user does not have a location set in their record.

HenryBrooks
ServiceNow Employee
ServiceNow Employee

Hi Eddie, yes I would agree with you.  The 'Set Loc/CC/Dep/Com from assigned to' being an OnChange Client Script, will not run if the asset's assignee is changed via the configuration item.

joel_maxwell
Tera Contributor

Hi Eddie,
As a general rule, it's best to discuss the requirement with the user and modify it into something that is logical. If you can't get them to create logical requirements than you will be stuck creating rules/scripts/etc. that will end up causing more harm then good in the long run. Then you will later end up with a "broken system" and the next requirement will be to "fix the system".

HenryBrooks
ServiceNow Employee
ServiceNow Employee

Hi Mary, just to add that as an admin you can easily locate the scripts that relate to a particular table using the Configure context menu on the relevant form.  So you/your admin will be able to proceed with knowledge of the baseline scripts.

Yasser Valizade
Mega Explorer

agree. 
Make sure the user has a location associated to it

daverottman
Tera Explorer

Can the coalesce script be developed to manage deltas on the records attributes? Specifically, when merging records - does the import set overwrite attribute values automatically or can that be handled on a field by field basis?

 

Eddie Parsa
Tera Contributor

Understood…But that is not the case I’m describing here. To test this scenario,

  1. select an existing CI/Asset
  2. verify that location and dept is populated (as listed on the user profile)
  3. change the “Assigned to” user (with different location and department) on the CI
  4. update
  5. check the Asset

existing behavior (OOB): Assigned to is updated with the new value but not the user location and dept

expected behavior: user location and dept fields must show values for the new users

 

My question: is there a particular reason for an OOB client script to exist enforcing the exiting behavior mentioned above?

 

HenryBrooks
ServiceNow Employee
ServiceNow Employee

A customer on a recent Asset course in UK was living proof of Joel's point: her organization was making an effort to get 'back in the box' as a result of previous over-configuration.

Yasser Valizade
Mega Explorer

I think a better place to handle special cases is the Transform Map.  It has scripting options so you can do Glide Records too.

Eddie Parsa
Tera Contributor

I'm quite aware of this and I say NO ti these type of requests all the time. This is a unique situation. So, what is the technical solution to this

joel_maxwell
Tera Contributor

Hi Dave,

Coalesce is a True/False field on the Transform Map. So if it is set to true and an incoming record "matches" then it will update any of the matching field values from the transform with the new data. If you need to run a script to determine Coalescence then you can do that by not using the OOB field, and instead rely entirely on a Before import script in the transform. This will be a lot more work though so make sure that you can't find a way to use the OOB coalesce field.

HenryBrooks
ServiceNow Employee
ServiceNow Employee

Hi Eddie, I just tried this in my dev instance and I was not experiencing the behavior you describe.  For me the location and dept are being updated when I select a different assignee.

HenryBrooks
ServiceNow Employee
ServiceNow Employee

.. that is when I modify the assignee on the asset form, the OnChange script I mentioned earlier is running as expected. 

Eddie Parsa
Tera Contributor

@ Henry, did you change the assigned to on the CI? and if so what version is your personal DEV is on?

brianhodges
Tera Contributor

Has anyone had success or heard of success enabling Asset Managers to import and transform their own data, based on vendor spreadsheets or spreadsheets they created?

There is a degree of risk involved, so I wanted to see if anyone is actually doing this...

Thanks,

Brian

brianhodges
Tera Contributor

Did the user have a location? What was the status of the Asset?

joel_maxwell
Tera Contributor

One possible reason is that the install status of the Asset is 2 (on order), 6 (in stock) , or 9 (in transit). If it is any of these then the script will not run to set these values. Apart from that it should be working as I am not able to reproduce the behavior assuming one of these states is not being used/set.

Tamika Miller
Tera Expert

Is it better to create a transform map or do the asset import via the asset table or even the computer table? Currently I do the import directly to the table. Can you tell me what pros and cons are to either or?

Joyce Bautista
Kilo Explorer

We currently have an 'asset import form' module that strictly has 3 columns (asset tag, serial number, MAC address). It is already set that we can only import one specific model category, model name & state. It is super helpful importing new assets when they are received at our dock. 

We are currently looking at ways to have the Asset Managers run imports to update assets in bulk (ie: retire, in stock)

 

brianhodges
Tera Contributor

Direct Import

Pros

Quick

Cons

Limited functionality, One table at a time, Coalesce on sys_id

Load and Transform

Pros

Robust, Coalescence options, Ability to clear fields, Ability to conditionally/dynamically update records, Control over reference data (insert/ignore)

Cons

Administrative overhead

I would probably only do a direct import from a data set that has been exported from ServiceNow, and most likely with a limited amount of records I can validate myself. Larger data sets are naturally a greater risk because it's not practical to validate thousands of records. Transform maps can help you protect your data by making decisions about what to do with unwanted updates.

brianhodges
Tera Contributor

Thanks Joyce. Do you rely on Discovery to fill in the blanks?

Joyce Bautista
Kilo Explorer

Everything else is pretty manual after the fact. Our AM only captures asset tag, serial number, MAC address, location and who it is assigned to. We currently don't use Discovery or CMDB at the moment, which we are currently looking at options for integration to fill in the other information. 

 

 

Joyce Bautista
Kilo Explorer

Question in regards to importing:

1. If you choose in the 'Choice Action' field to ignore or reject, is their an alert that lets you know which information was ignored or rejected? 

HenryBrooks
ServiceNow Employee
ServiceNow Employee

Hi Eddie, yes I changed the assigned to on the CI. I'm on Kingston Patch 4.

HenryBrooks
ServiceNow Employee
ServiceNow Employee

Hi Joyce, there is no specific alert that I am aware of, but you can see which records were ignored or rejected in transform history module, and can look at the related import logs.

joel_maxwell
Tera Contributor

Hi Joyce,

You should be able to see some of this information in the transform history/transform log. That said, the data that is logged here is not usually very verbose. As such sometimes its necessary to add additional logging using the "log" object in conjunction with a transform script.

Yasser Valizade
Mega Explorer

You will not see a visual alert, but as Jo3l has mentioned it will be captured in the log file.

Joyce Bautista
Kilo Explorer

Thanks everyone! This is useful info I will share with our sys admin !

Joyce Bautista
Kilo Explorer

Do you have some theories of a way for Asset Managers to import assets. I would love to chat to brainstorm on this idea. 

HenryBrooks
ServiceNow Employee
ServiceNow Employee

Hi Eddie, I commented on this already, but for some reason it did not appear - maybe a refresh issue, so this is my second attempt.

Firstly, I completely understand your point that sometimes saying NO is not an option even if you feel the requirement is one you would rather push back on.  

My thought would be use the Stockroom Type field to represent a shelf, so that a shelf would be treated as a special kind of stockroom.  For me this has the advantage of being a relatively minimal configuration, so you would not need to adjust the 'Source Request' dialog if you use the Service Catalog integration (you will see this today if you are not already familiar with it).  I have attached a screenshot of the Stockroom Type field

My second thought would be to have a chat with some of the BBC (Big Brain Consultants) in the room during one of the breaks.  It's good with these kind of requirements to hear a few people's opinions before proceeding.  You could offer your hard-won break snack for the idea you like the best!

HenryBrooks
ServiceNow Employee
ServiceNow Employee

Hi Brian, quite a few Asset Managers I have met in a training context have expressed frustration about not having more control over the import sets at their organization, given that they are ultimately responsible for the quality of the data imported.  I can sympathize with this; as the AM has 'skin in the game' surely he/she should look after the Asset Imports?  On the other hand I expect the Foundation Data (what Kailey referred to yesterday in her discussion of reference fields, eg users, locations, departments etc) is always going to be the admin's responsibilty so I guess the AM is always going to need a tame admin to help with that.

HenryBrooks
ServiceNow Employee
ServiceNow Employee

Hi Eddie, sorry, to clarify (end of day/lack of tea ...).  If I change the assigned to on the Asset then the OnChange client script mentioned above runs as normal and it uses getReference() to look up the assignee's location, dept, cost center.  However if I change the assignee on the CI then the client script, being a client script on the asset form only, will not run.  

A workaround for this would be to remove 'isLoading' from the if statement in the client script, with the effect that next time you load the asset form the same script will run and populate the fields as normal.  (Though the downside is that the client script then runs on form load).  Another workaround would be to have a business rule on the CI form that runs only if 'assigned to' changes and then updates the related asset fields.  You could also of course write an OnChange script for the CI.  So in summary I see the inconsistency you are pointing out.  I suppose it illustrates that Client Scripts can sometimes be something of a 'false friend'.

HenryBrooks
ServiceNow Employee
ServiceNow Employee

Hi Eddie and Brian, just to mention I added a couple of comments to your posts from yesterday - I'm afraid I updated a non-refreshed version of this article so a couple of my comments did not come through yesterday.

HenryBrooks
ServiceNow Employee
ServiceNow Employee

.. please let us know if we missed any of your questions from yesterday - if so it is not intentional!

brianhodges
Tera Contributor

i was doing that all day yesterday lol 🙂 

brianhodges
Tera Contributor

thanks for your responses

mary47
Giga Contributor

FAC = Facilities

John B2
Giga Explorer

Question;

Can rules be created that auto assign assets to a maintenance contract based on business logic?  Such as, if the asset is in a certain location then its covered by X contract...

 

Thank you.

John B2
Giga Explorer

We utilize the warranty end date field at the asset level to determine when an asset is no longer under maintenance by a contract.

shembop
Tera Contributor

Can I pull in the warranty for each asset? Depending on when we buy the PC, our expiration date would  be different.

 

amitjhingran
Tera Contributor

Can we manage Software license renewals under contract mgmt

brianhodges
Tera Contributor

If we didn't want to manage the entire Contract Lifecycle, is it as simple as not selecting an approver on the contract when it is created? Or, are there some business rules or workflow we should disable?

Thanks

Brian

daverottman
Tera Explorer

Can the contract cost information be tied to incidents? For example, I have a contract with a vendor that charges me $50 per incident. Since the assets will be tied to the contract, can I relate the assets to the CI's on Incidents to see the cost of incidents for covered assets during a specified time period?

Version history
Last update:
‎04-09-2018 10:37 AM
Updated by: