AnsweredAssumed Answered

Print the CI Name

Question asked by Johnny_2302 on Mar 28, 2016
Latest reply on Mar 28, 2016 by Johnny_2302

Hi All,

I facing difficulties in printing the CI name. Below is the requirement:

 

For a  request call, When the user clicks SAVE on Technically closed a pop up should be displayed

1. If the CI is already selected: 

     "<CI Name> is selected, do you want to reselect?".

If the user re-selects the new CI then the new CI name should come in the above pop up.

 

2. If CI is not selected:

     "CI Not selected, please select a CI"

 

Now the issue here is when I use below command it displays the CI name(if it was already selected) but if it gets reselected then this doesn't yield the new value(since it is not saved yet)

alert('$args.affected_resource');

If below command is used then it gives the UUID of the CI, which is of no use.

alert(document.main_form.elements["SET.affected_resource"].value)

So is there any way to print the CI name here instead of UUID?

 

I tried below code as well, it didnt help i believe there is some syntax issue:

 

<PDM_LIST PREFIX=cit FACTORY=nr WHERE="id  like 0x8C99FE396B856D42AF077F67C3931684">

  alert('$cit.name');

  </PDM_LIST>

 

kindly help.

Outcomes