Need help on dot walking to CI class tables

shaik_irfan
Tera Guru

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 // 

 

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

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

LinkedIn

View solution in original post

10 REPLIES 10

So we dont have any option to handle with simple scripting ?

Well applying ref_ is already not simple scripting 🙂

So how does your complete script look like now? Maybe it's not that much extra code, though I don't know what you've exactly have set up.

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

LinkedIn

It looks like below:

 

options.filter = 'ci.ref_cmdb_ci_computer.u_version_required=true^install_statusIN6,1';

 

Its working now, but i know we have 40 tables on which we have Version required field created so i guess we need to dynamic thats where i am struck now 😞

Anurag Tripathi
Mega Patron
Mega Patron

Not trying to hijack the thread.

But I wrote something few months back on the same lines. Hope it would be helpful.

https://community.servicenow.com/community?id=community_blog&sys_id=379cc7ffdbc054dc1cd8a345ca9619f9

 

-Anurag

-Anurag

Good article, didn't see it before. Marked as helpful immediately. Also the ref_ and more explanation, nice!

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn