Today (today when I am writing this–not today when the scheduled post will go live), I came across an interesting behavior in ServiceNow that I wasn’t expecting.
I had noticed previously that when you add a custom field to a table, that field is automatically added to the table’s form (at least one of the forms).
Today, I added a field to a table that is parent to a whole bunch of other tables. I had a passing thought that I should check the child tables to see if the field was added to them as well.
As it turns out, it is, but only under certain circumstances. It appears that if you’ve never opened a form up before, then the first time that you open the form up it has some logic that it follows to add some/all/most of the fields in the order that they were created.
So, if you’ve never opened up the form for a child table, and you add a custom field to a parent table, then when you open up the child form, it will have the new field on it.
However, if you’ve ever opened up that form, then adding a field to a parent table won’t impact the fields that are on the child table’s form.
A big thanks to Cory S. from the ServiceNow devs Slack channel for pointing me in the direction of how all of this worked!