Continuation of script to next line

aarav
Kilo Contributor

Hi Friends.

I have to close many Incidents . i am doing it by script by hardcoding them.

Like

var chn = new GlideRecord('incident');

chn.addQuery('number','IN','INC0051502,INC0051172,INC0051088,INC0051334');   like this i have to provide some 500 incidents.

The above statement is working for 4 incidents.But how to hardcode 500 incidents .

Like

chn.addQuery('number','IN','INC0051502,INC0051172,INC0051088,INC0051334',                                                                                                    

INC0051502,INC0051172,INC0051088,INC0051334,INC0051502,INC0051172,INC0051088,INC0051334,

INC0051502,INC0051172,INC0051088,INC0051334');

The above statement is showing error as i not providing end of line and start of line symbols/commands ..

Please let me know how to continue to next line.

Thank you very much in advance.

regards

Aarav

13 REPLIES 13

Aakash Shah4
Tera Guru

Use addOrCondition()


Aakash Shah4
Tera Guru

Thank you for your time Aakash on this.


But i am not able to locate my requirement in that.



thanks again.


Aarav


var chn = new GlideRecord('incident');


chn.addQuery('number','INC0051502').addOrCondition('number','INC0051088').



and so on.



As Harsh said, if you have anything common in these Incidents then it would be easier to query through the records.