Setting fields of a table to active=false [sys_dictionary.active]

conmic
Mega Guru

Greetings!

My colleague and I came recently to an interesting discussion: What happens if you set an actual field of a table to inactive [sys_dictionary.active = false]?

Looking up on existing discussions, I could only find the following thread: What is the impact of setting a table to ACTIVE=FALSE?

However, it only talks about setting an actual table to inactive and the reply is rather cautious.

Furthermore the field "active" is described as follows in the wiki:

Enables or disables the field. When this check box is cleared, the field is not used by the system

Source: http://wiki.servicenow.com/index.php?title=System_Dictionary#gsc.tab=0

There is not much more information around this and what are the actual recommendations of ServiceNow?

Thus we wanted to start a discussion here, as it might be useful in some cases.

Also, perhaps somebody of you has already made some experiences?

Of course we tried it already out on a Developer Program instance where we set the field "task.active" to false and checked what happens...

Capture.PNG

Nothing... (at least not noticeably now)

It seems just to become unavailable on UI level, however if you use it on script level everything still works fine. No errors, no warning, nothing... it works

find_real_file.png

You can even pass it as URL parameter and it works
Capture.PNG

It's just not available anymore on any UI element such as the list personalizing or drop-downs

Capture.PNG

Of course this is logical from a database perspective, because you cannot disable a field in a database.

The field is only disabled on UI level and it seems that framework level is NOT impacted.

So this opens up multiple uses, two of the major ones we could think of are:

  • You could avoid fiddling around in ACLs to make legacy fields unavailable (and thus avoid compromising security). Just disable it and data is preserved.
  • You could create meta-data fields without caring about the ACL level.AS the fields are still accessible by the framework (scripts, etc.)

So why is this not part of the ServiceNow best practices? What problems may it cause? etc...

2 REPLIES 2

kc1959
Tera Contributor

Hi Conmic,

I know this is an old post but did you ever get any further with your questions around this functionality.

I have a similar issue whereby we have some legacy scrum fields that need to be removed from forms and one of the criteria is that "the fields should no longer be selectable in reports".

If I amend the read ACLs for these fields (as we would normally do) then the fields are still selectable in reports but will be empty (no read access).

Obviously the above method would be a lot better (and easier) but I'm not aware of any implications in doing this.

Thanks,

Keiron.

 

midjoule
Kilo Sage

Hi @conmic,

I came across the same question. @Chuck Tomasi , would you have the answer ? Can we use an "inactive" field (field.active = false) as a hidden field that we reference in scripts for instance ?

find_real_file.png

 

Is there any limitation ? Is it a bad practice ? What is this "active" flag used for ?

Best regards