- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2016 04:22 AM
I have a requirement where I have three variables in service catalog
1. CI Type(select box) -> VM , Linux , ESX, JBOSS
2. CI Name (reference field)
3. Sys ID (single line text)
Now I want that whenever the CI type is changing the referenced table in CI Name should change accordingly with their respective tables.
like for vm ->cmdb_ci_vm similarly for others as well.
My end result is to fetch selected ci name's sys id .
For changing reference field script include and onchange client script will be required .
for sysid fetch also onchange or onsubmit script will be required . Not sure about this
Please help me with the correct code for my requirement .
Let me know if you need any further information.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2016 02:13 AM
Please replace-
var type=current.u_type;
with
var type=current.variables.u_type;
It should work now. Best of luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2016 02:18 AM
Thats great worked I will include other also in if else code .
Please last favour provide the code to fetch sys id of the CI .
I will be really grateful to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2016 02:29 AM
To provide the sys_id ? where do you want to fetch the sys_id ? in script include ? or any client script ? what is the requirement ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2016 02:33 AM
See like this in the screenshot
Once the ci name is selected by the user its sys id should come in the sys id variable present below .
Any thing would do be it client script or script include . They just want to have the end result the sys id population.
Please help me with the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2016 02:38 AM
Ok no problem I will help you with the code only if you mark one of my answers correct and the rest of them helpful.... is that fair ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2016 02:41 AM
Anyways I would have done that. No need to mention You are really helpful