Find the type of Catalog Item Variables

shona
Kilo Explorer

Hello,

I want to find out the type of catalog item variables, on the associated workflow.
Can anybody help me with this?

Thanks in advance!

1 ACCEPTED SOLUTION

gdd
Giga Expert

var ReqItem = new GlideRecord('sc_item_option_mtom');


ReqItem.addQuery('request_item','0d72825fdb0903002f30f6dfbf9619ff');


ReqItem.query();


while(ReqItem.next())


{


gs.log(ReqItem.sc_item_option.item_option_new.type.getDisplayValue());


}


View solution in original post

6 REPLIES 6

Harsh Vardhan
Giga Patron

HI Shona,



can you please give me little bit more information about your requirement?



Variable Types - ServiceNow Wiki


Likely wants to evaluate the data type of the variable before performing a script on it.... though I don't know why that would be different scenario by scenario


Hi Harshvardhan,



I want to check the data type of the Catalog Item variable depending on which I'll be performing a script on it.


Here basically I want to know how to check the type of the catalog item variable. Additionally, this I want to do on the workflow(Run Script Activity) associated with the catalog Item.



Thank you!


you can check it from maintain item.



service catalog>> Maintain Items >> search for your catalog item.



or either you can right click on your catalog form variable >> configure variable to check the variable type. this is the only way you can know what's your variable type.



find_real_file.png