- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2020 11:52 PM
Hi,
I have script written on alm_asset table i am trying to pull a field called Version Required (u_version_required) which is custom field available only on CMDB Computer table
Now how can i check validation the version required is set to true from the current asset table
I thought of doing like this
current.ci.install_status=6 //
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 12:23 AM
Hi there,
Could you explain your question a bit more?
You are on the alm_asset record? And you want to dotwalk to the Configuration Item (field: ci, reference to cmdb_ci)? And then for example get the value of u_version_required which is only on cmdb_ci_computer? That's what I get from your question.
You could reach u_version_required, by using ref_, something like ci.ref_cmdb_ci_computer.u_version_required.
Though you are also mentioning current.ci.install_state? What's the relation with this?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 12:23 AM
Hi there,
Could you explain your question a bit more?
You are on the alm_asset record? And you want to dotwalk to the Configuration Item (field: ci, reference to cmdb_ci)? And then for example get the value of u_version_required which is only on cmdb_ci_computer? That's what I get from your question.
You could reach u_version_required, by using ref_, something like ci.ref_cmdb_ci_computer.u_version_required.
Though you are also mentioning current.ci.install_state? What's the relation with this?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 12:45 AM
Thanks for the reply, what you understand is correct.
This is addtional conditon like current.ci.install_state let me try to use .ref_Cmdb_ci_computer and will let you know if it works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 01:00 AM
It got working but a small information required.
Assume on the ci class tables half of my class tables have a custom field called Version Required and half of the table does not have that ?
Do you have any idea how can we set dynamically to work ?
Example:
I have version required field available only below tables but not on the rest of the tables, can we set the dynamically instead hard-coding for specific table ?
cmdb_ci_computer
cmdb_ci_server
cmdb_ci_software
cmdb_ci_hardware
instead of ci.ref_cmdb_ci_computer.u_version_required can we do like this ci.u_version_required ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 01:13 AM
"Assume on the ci class tables half of my class tables have a custom field called Version Required and half of the table does not have that ?"
That makes it more difficult 🙂 You might add if conditions or a switch to your scripting, to check which table it concerns. A bit extra scripting unfortunately.
Just ci.u_version_required won't work because of the custom field which is on cmdb_ci_computer. Just dotwalking to ci (cmdb_ci) won't work because cmdb_ci does not know of that field.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field