@Ria 

is that an OOB field style or a custom one?

are you sure your logic is working fine i.e. the script?

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