How to include variables under My Request widget?

jituksingh
Kilo Guru

Hi All,

I want to display some of variables under My Request widget on Service Portal page so that user know what REQ is for what purpose? Please help me to achieve that.

Thanks in Advance!

find_real_file.png

Regards,

Jitendra Singh

6 REPLIES 6

RavindranKeshav
Giga Expert

Hi JItendra,



Requests can have multiple Request Items.


Request Items might have multiple variables.



So, it may not be a good idea to populate then on My Requests list.



Maybe you could elaborate with some examples on why you want to do this so we can suggest something.


chirag_bagdai
ServiceNow Employee
ServiceNow Employee

Hi Jitendra,



As Ravindran mention, this is not a good option to add variables in Request list because one Request can have multiple RITMs but still if you are looking for solution related to this


here is an example where you can add variable names in data.variables = ['']; array in attached widget at line#9 (server side).



Please find attached widget XML. You can import this xml in widget (sp_widget_list) table and include in any page to see result.



find_real_file.png


Hi Chirag,


Thanks for replying! I don't want to show up every variable. I just want to display one variable lets say it is short_notes which give brief detail about request. Is that possible if yes how?



Regards,


Jitendra Singh


Just to clarify - Variables are associated with RITM (Requested Item) not with My Request.



As I mention, you can add variable name in array and the script will print all variables for example, if you want to show "short_notes" variable then add "short_notes" to data.variables = array like data.variables = ;