@Deepika61 

if you already have a script include then just create a function in it and add the code.

then call that script include function

I hope I have answered your question.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader