"True/False" field , set default value is true, why in form layout it isn't be checked?

zhihong
Tera Contributor

hi experts,

I set "Active" field default value is true, why new a record , it isn't be checked?

find_real_file.png

find_real_file.png

17 REPLIES 17

Anurag Tripathi
Mega Patron
Mega Patron

The field looks okay, can you just confirm that when you are looking at the screenshot below, you are looking at u_active field and not the oob active

find_real_file.png

 

-Anurag

-Anurag

Mark Roethof
Tera Patron
Tera Patron

One other thing that jumps in mind to double check. There are no client scripts or whatever, setting the value to false?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Michael Jones -
Giga Sage

Maybe try using javascript in the default value?

Something like this: javascript:gs.info('set field to true');true;

You can check the logs to see if the first part is executing, and if so, then you can assume something else is changing the value after the form loads. The only part you really need is javascript:true; to set the value. 

Also, make sure you are looking at a new record, not an existing record as default values only apply when a new record is first loaded, not on a subsequent reload. 

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

Allen Andreas
Administrator
Administrator

Hi,

Some good suggestions by everyone here...a few OTHER things...

1) Default value only counts when the record is first created...so if you're continuing to go back and check an already created record and that field...it won't default to true if you did this change afterward.

2) Check this record from list view first...after it's created and not from the record/client as any scripts could be altering the view

3) If you're in the record, right-click gray header area or click context menu and choose: History > List and see for this field if anything else is setting it to another value.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

Yea, unfortunately, even with all these replies, it seems the author isn't sure what actually fixed it...as the author stated in their reply...it would be wise to work through stuff one by one...

Anyways, take care!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!