Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

how to set a negative value to the duration field?

Rose17
Tera Contributor

Hi All,

I want to set a negative value in a duration field.

Is it possible to do so?

Any help will be appreciated.

Thanks in advance.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I believe a duration field cannot display/accept a negative value. please check links below as well

https://docs.servicenow.com/bundle/london-application-development/page/script/general-scripting/conc...

https://community.servicenow.com/community?id=community_question&sys_id=7cabc1badb219c1014d6fb243996...

Regards
Ankur

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

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I believe a duration field cannot display/accept a negative value. please check links below as well

https://docs.servicenow.com/bundle/london-application-development/page/script/general-scripting/conc...

https://community.servicenow.com/community?id=community_question&sys_id=7cabc1badb219c1014d6fb243996...

Regards
Ankur

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

Could you tell me which field type can store -ve values?

Hi Rose,

you can have normal string field or integer field to hold those negative values

Regards
Ankur

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

Tanushree Doiph
Mega Guru

Hi, 

as mentioned in Docs, Negative duration values are not supported

 

Below links will help you,

https://docs.servicenow.com/bundle/london-application-development/page/script/general-scripting/conc...

https://old.wiki/index.php/Setting_the_Duration_Field_Value 

 

Thanks

Tanushree