Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Help with script for advanced reference qualifier

Lon Landry4
Mega Sage

Hi Community,

The last current.variables works fine. (+'assigned_to=' + current.variables.tb_submitted_for;) no issues

But, 'sys_idNOT LIKEcurrent.variables.first_list_of_assets^' is not working. - no errors

 

javascript&colon'install_statusNOT IN7,8,17,^'+'model_categoryNOT LIKEServer^'+'sys_idNOT LIKEcurrent.variables.first_list_of_assets^'+'assigned_to=' + current.variables.tb_submitted_for;

 

The value in the first_list_of_assets field is a list of Sys IDs separated by a comma.

5 REPLIES 5

AshishKM
Kilo Patron
Kilo Patron

Hi @Lon Landry4 , 

Please use the updated one as below.

 

'sys_idNOT LIKE'+current.variables.first_list_of_assets^

 

avascript&colon'install_statusNOT IN7,8,17,^'+'model_categoryNOT LIKEServer^'+'sys_idNOT LIKE'+current.variables.first_list_of_assets^'+'assigned_to=' + current.variables.tb_submitted_for;

 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

I tried that syntax earlier -'sys_idNOT LIKE'+current.variables.first_list_of_assets^
but the filter stops working completely.

please see attachment further down in chain for code example

Sagar Pagar
Tera Patron

Hi @Lon Landry4,

 

Try this -

javascript: 'install_statusNOT IN7,8,17^model_categoryNOT LIKEServer^sys_idNOT IN' + current.variables.first_list_of_assets + '^assigned_to=' + current.variables.tb_submitted_for;

 

Thanks,

Sagar Pagar

The world works with ServiceNow