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.

How to merge two conditions in Reference qualifier

Kartik Magadum
Kilo Sage

Hello
How can we merge the two separate conditions in a reference qualifier?

Condition 1: javascript: gs.getProperty('crossfuze.cmdb.task_items_query');
Condition 2: javascript: new PrincipalClass().getPrincipalClasses();

Any assistance in resolving the issue would be greatly appreciated. 

Thanks and Regards

Kartik Magadum

8 REPLIES 8

sasi_v
Tera Guru

Hi Karthik,

 

Please refer below articles

1.https://www.servicenow.com/community/now-platform-forum/how-to-call-two-script-includes-in-reference...

2.https://www.servicenow.com/community/service-management-forum/is-it-possible-to-have-two-reference-q...

 

 

If my answer was helpful, or solved your issue, please mark it as Helpful / Correct.
Thank you,
Sasikanth

Vishal Birajdar
Giga Sage

Hi @Kartik Magadum 

 

Can you try like below :

 

 

javascript : var query;
var first_query = gs.getProperty('crossfuze.cmdb.task_items_query');
var second_query = new PrincipalClass().getPrincipalClasses();

query = first_query +'^' + second_query;

//gs.log("full query=" +query);

 

 

VishalBirajdar_1-1698743944440.png

 

 

 

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

Hello @Vishal Birajdar 

Upon saving RQ, the field value of 'User reference qualifier' is changing from Advance to Simple.

Hi Kartik,

 

Is it custom field or OOTB field...??

Can you send a screenshot...if possible...!!

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates