Populating a string field from a field from a reference field

Community Alums
Not applicable

I have 3 reference fields that point to a couple of the tables that make up the Mitre Attack tables in Servicenow.  These relate back to a custom table that we have (See Picture).  I am able to bring across the ID of the Tactic, Technique and Sub-technique for each but they don't show up in a Related list from a previous form so not what the user is looking for.  So I think I am going to have to create 3 fields that are populated from the reference field as another field in that reference table (God, I hope that makes sense).  So basically a lookup on a reference field to populate a read-only string field that will get another field from that populated reference field.
If you look at this image:

StephenC_1-1697048501018.png

You can see that Mitre Tactic has an ID of TA0043 and so on as the fields kind of line up. 
I can't show the ID's on a related list as they are just brought into the view from dot walking a column to show on the form. 

I would like to create 3 new fields that hold the IDs of these called Mitre Tactic, Mitre Technique, and Mitre Sub-technique (respectively) and update the labels to reflect the correct name (currently cannot as they are just brought in using dotwalking as explained).

So how would I accomplish this?  It's a reference field on Mitre Tactic that shows only the name.  I want to populate the new field with the ID from that reference.
How would I do this

 

 

 

1 REPLY 1

Carlos Loza
Tera Expert

Hello,

 

i'm assuming the table structure with their respective fields looks somewhat like this?:

 

  • Mitre Tactic
    • ID
  • Mitre Technicque
    • ID
  • Mitre Sub-technique
    • ID

And you are showing on the form the Mitre_Tactic.ID fields respectively

 

if the above is correct

-the most straightforward thing to do is change the labels for each ID field of the different tables to something like "Tactic ID"

-other alternative is to do a client script that changes the labels but that would not be considered optimal