
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2015 12:17 PM
Hello everyone,
I am having a hard time figuring out how to make this script include work in the incident form. Basically, I was asked to 'filter' the CIs when the caller is a specific person (ex: a store).
What I have done is the following:
-Created a check box field called "Is a store" in the incident form that is automatically check via a client script when the caller belongs to a group called "Store Users".
-Created (or attempted to create) a script include that looks at the 'is a store' checkbox in the incident form, if it is checked, it should only show the CIs marked with a class of "Store hardware" or applications marked as "Store Applications".
...
I also tried it this other way but didn't have luck either...
-Add the script include as 'javascript:getStoreCI() to the incident dictionary override to see if it would work but nothing is happening. I still see the same CIs as before.
This is not working for me as I thought it would... and I'm not sure what I'm doing wrong... does any one have an idea of how I can make this work? please let me know if I totally wrote wrong the script include and if i'm not calling it correctly in the dictionary override... I am stuck Please help!
Yeny
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2015 12:25 PM
Hi Yeny,
The reference qualifier of the field should be 'javascript:scriptincludename.getStoreCI()
Replace scriptincludename with the name of the script include you have created.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2015 12:25 PM
Hi Yeny,
The reference qualifier of the field should be 'javascript:scriptincludename.getStoreCI()
Replace scriptincludename with the name of the script include you have created.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2015 12:48 PM
Hi Pradeep!
Thank you for your response! I tried what you suggested but it didn't work for me... I'm still able to see the full list of CIs and not the filtered list that I am trying to produce... Could it be that I wrote the script include wrong? Maybe I'm missing something... I'm not very big in scripting but I do my best... do you see anything in it that could be causing it not to work? The CIs I'm trying to populate are in different tables (for example: Store Hardware ('u_cmdb_ci_store_hardware') and Applications ('cmdb_ci_appl'))... Could that be a reason why?
Thank you so much!
Yeny

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2015 05:56 AM
Hi Pradeep,
Thank you so much for taking the time to work with me and make the script work to how my customer needs it. So far, everything is looking good!
Thank you!
Yeny

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2015 08:38 AM
Perfect
I am glad I can be helpful.