dot-walking on forms to other tables

Dave49
Giga Contributor

Than you all for your help in advance. I have only been working in the platform since October of 2019 when I started my Journey into the ServiceNow world with 10 weeks of intensive training and 3 certifications.

Below is the problem I am having:

I added 3 fields to the incident form that reference 3 different fields on the Service table [cmdb_ci_service].

1) Label = Service; Name = business_service; Type =Refernce; Reference = Service[cmdb_ci_service]

2) Label = Service.Service Type; Name = business_service.u_ type; Type =String; This is referencing the u_type field on the Service[cmdb_ci_service] table.

3) Label = Service.Business Unit; Name = business_service.u_ business_unit; Type =Refernce; This is referencing the u_ business_unit field on the Service[cmdb_ci_service] table. This field then references the Name field on the business_unti table.

This was done to get the functionality of selecting a service and having the the Business Unit and Service Type fields auto populate with the information related to the service selected from the Service table.

Unfortunately, while this worked, if the user changed either the Business Unit or the Service type or both, when the Incident was saved, it also added a new record to the Service table with the the same Service, but with new Type and or Unit values. This was Not what was expected or desired.

I have gone back over the training materials I have from the 5 courses I have been through as well as the Docs site and there is nothing that talks about this "Side effect".

Did I do something wrong in configuring the fields? Or, is this known but undocumented behavior?

We have ditched the dot-walking and switched to a combination of reference and choice fields with client scripts to get the desired functionality and that seems to be working as desired with out the undesired side-effects.

Thank you all for your help in understanding what is going on.

3 REPLIES 3

Community Alums
Not applicable

Hi Dave,

On the fields you created, is dynamic_creation set to true or false?

When it's set to true, it's expected behaviour - docs site

That's the only time I've ever used it before - but it was the behaviour I wanted :-). 

Cheers
Mike

Michael Jones -
Giga Sage

What you are experiencing is the expected behavior, though I'll agree that it is not well documented or advertised. When you dot.walk a field on to a form based on a reference in another table, you are - for all intents and purposes - showing those fields as if you are on the referenced form. If the user viewing the record has write access, then any changes made would be exactly the same as if they loaded the referenced form and made the changes directly. 

Unfortunately this seems to be one of those "landmine" lessons most of us learn the hard way, as you have. 

Typically speaking, if you want to ensure that referenced data is read-only and can't update the referenced record then pulling the data into custom fields or using a processor (to display information) are the typical ways to go. In some situation a script that makes the dot-walked fields read-only can be effective, but it's not 100%. 

If you do want to use dot.walked fields (and there are situation where it just makes sense, though they are rare) then you can take some additional precautions to keep your referenced records intact. This blog post has some good info: 

https://community.servicenow.com/community?id=community_blog&sys_id=9bad66a9dbd0dbc01dcaf3231f961984

Hope this helps! 

 

If this was helpful or correct, please be kind and click appropriately!

Michael Jones - Proud member of the CloudPires Team!

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

Dave49
Giga Contributor

Mike and Michael, Thank you both for the information and furthing my knowledge of the platform. I was working with one of my former instructors on this and he was surprised that the other table was getting updated.

We made several changes to the Incident form and removed the dot-walking. It is now done with reference fields and scripts. and seems to be working as requested.

Yet another week spot in SNow documentation. But as usual, the Communtiy shared it's communal knowledge base.

 

Thank you for the teaching!

Dave