From a Variable set, is it possible to access the variables of the same record producer?

Flavio Tiezzi
Kilo Sage

Hello guys,

From a Variable set, is it possible to access the variables of the same record producer?

Thanks,

Flavio.

1 ACCEPTED SOLUTION

Yamilla Manjko
Tera Guru

You can use the g_service_catalog API:

 

g_service_catalog.parent.getValue("variable_name")

 

https://developer.servicenow.com/dev.do#!/reference/api/rome/client/g_service_catalogClientAPI

View solution in original post

4 REPLIES 4

Jaspal Singh
Mega Patron
Mega Patron

You mean variable a from Variable set 1 to be accessible in Variable set 2?

If so, yes you need to build catalog client script, catalog UI policy at Record producer level & not variable set (1 or 2) level.

shwetapj
Tera Expert

Hi,

 we can't access variables of record producer from variable set client script/UI policy because variable set are not specific to any item, they are group of variable could be reused across multiple items.

Community Alums
Not applicable

Hi @Flavio Tiezzi ,

Unfortunately , you can't. 

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

 

Yamilla Manjko
Tera Guru

You can use the g_service_catalog API:

 

g_service_catalog.parent.getValue("variable_name")

 

https://developer.servicenow.com/dev.do#!/reference/api/rome/client/g_service_catalogClientAPI