Product documentation Docs
    • English
    • Deutsch
    • 日本語
    • 한국어
    • Français
  • More Sites
    • Now Community
    • Developer Site
    • Knowledge Base
    • Product Information
    • ServiceNow.com
    • Training
    • Customer Success Center
    • ServiceNow Support Videos
  • Log in

Product documentation

  • Home
How search works:
  • Punctuation and capital letters are ignored
  • Special characters like underscores (_) are removed
  • Known synonyms are applied
  • The most relevant topics (based on weighting and matching to search terms) are listed first in search results
Topics are ranked in search results by how closely they match your search terms
  • A match on the entire phrase you typed
  • A match on part of the phrase you typed
  • A match on ALL of the terms in the phrase you typed
  • A match on ANY of the terms in the phrase you typed

Note: Matches in titles are always highly ranked.

  • Release version
    Table of Contents
    • Now Platform user interface
Table of Contents
Choose your release version
    Home Orlando Now Platform User Interface Now Platform user interface Common UI elements Selecting fields on related tables using dot-walking Dot-walking examples

    Dot-walking examples

    • Save as PDF Selected topic Topic & subtopics All topics in contents
    • Unsubscribe Log in to subscribe to topics and get notified when content changes.
    • Share this page

    Dot-walking examples

    Access fields on a related table from a form, list, or script by dot-walking. This topic includes examples of the different ways you can dot-walk.

    List fields

    You can dot-walk to related fields in a list, such as the field list in a filter. This example demonstrates how to filter the Incident [incident] table by the company of the caller who registered the incident.

    When you open the list of fields that you want to filter, you see the list of available Incident table fields. The reference fields are followed by the related fields. For example, Caller is followed by Caller > User fields, which means that Caller is a reference field, and the related fields are user fields on the Caller record. If the related fields are not present in the list, you would select Show Related Fields at the bottom of the list.
    Show related fields
    When you select Show Related Fields, the menu reloads to display related fields.
    Related fields
    When you select a related field, the menu reloads with the fields of the related table.
    Related table fields

    When you select Company under Caller → User fields, the field then becomes Caller.Company.

    The following example shows where you are in the dot-walk. Each selected reference is stored at the top of the fields menu, and the number of dots preceding the field label indicate how many dots from the initial record the user has reached.
    Dot-walked field

    The example shows that the user is at Incident.Caller.Company. You can return to higher levels in the hierarchy by selecting fields located at the top of the menu. For instance, selecting Incident fields returns to the list of incident fields.

    The related fields can be removed by selecting Remove Related Fields at the bottom of the list.
    Remove related fields

    Condition builders

    You can make a detailed query on a table by dot-walking in the condition builder.

    To dot-walk in a condition builder, first select Show Related Fields on the fields menu. This action allows you to add fields from related tables to your query.

    The following GIF shows how you would dot-walk fields in a condition builder to find all Incident records assigned to one specific user, Beth Anglin. In the example, the user navigates to Incident > Open and then opens the condition builder. In the fields menu, the user first selects Show Related Fields and then opens the fields menu again to select Assigned to → User fields. The user opens the fields menu again to select Last name. The user builds the following condition: [Last name] [is] [Anglin]. After the user selects Run, the Incident list displays only the records assigned to Beth Anglin.

    The GIF demonstrates how to dot-walk in a condition builder,

    List collectors

    When selecting a list of fields from a list collector (for example, when you are configuring a form), you can dot-walk to fields from other forms.

    To see which fields are reference fields and can be dot-walked, look for green fields with a plus symbol.
    Reference fields
    Once a reference field is highlighted, the expand icon (Expand icon) appears above the add icon.
    Expand icon
    Selecting the expand icon opens the list of fields from the related list in the Available pane. The following example shows that the Assigned to fields were selected. The previous lists of fields appear at the top of the list.
    Lists of fields
    Once the field is added to the Selected pane, it appears with its full dot-walked syntax. The following example, shows that Assigned to.Active has been selected.
    Dot-walked field

    Scripts

    You can dot-walk within a script by invoking the dot-walk syntax. This functionality requires a knowledge of JavaScript.

    For scripts that run on the server side, such as business rules, it is necessary to add current.

    The following script, for example, is a scripted approval rule that requests an approval from the manager of the user who opened the ticket.
    try {
        current. opened_by. manager ; } catch (err ) { }
    For scripts that run on the client side, such as client scripts, current is not necessary. For instance, the following Highlight VIP Caller script runs on the client side.
    function onChange (control , oldValue , newValue , isLoading ) {
     
         //wait until there is a valid record in the field if (newValue ) {
     
           //get the caller object so we can access fields var caller  = g_form. getReference ( 'caller_id' ) ;
     
           var callerLabel  = document. getElementById ( 'label.incident.caller_id' ) ; var callerField  = document. getElementById ( 'sys_display.incident.caller_id' )
     
           //check for VIP status if (caller. vip == 'true' ) {
     
             //change the caller label to red background //style object is CSSStyleDeclaration, style names are not standard css names if (callerLabel )
               document. getElementById ( 'label.incident.caller_id' ). style. backgroundColor = 'red' ;
     
             //change the caller's name field to red text if (callerField )
               document. getElementById ( 'sys_display.incident.caller_id' ). style. color = 'red' ; } else { //not a VIP, remove temporary styles if (callerLabel )
               document. getElementById ( 'label.incident.caller_id' ). style. backgroundColor = '' ; if (callerField )
               document. getElementById ( 'sys_display.incident.caller_id' ). style. color = '' ; } } }

    Variables

    Often, you can add variables into templates, notifications, or other forms where a value is being called from the form.

    For example, ${assigned_to} is the variable for the Assigned to field.

    As shown in the example, you can dot-walk to fields on the original record of any reference field. It is possible to dot-walk to any field on the assigned_to record, for example, ${assigned_to.manager}.

    When you dot-walk, you can have a longer chain if you need it, as in this example: ${assigned_to.department.manager.mobile_phone}.

    Sometimes, you can select this variable from a tree picker.

    Tree pickers

    The tree picker interface has an expandable, hierarchical view that you can use to look up the following items:
    • Configuration Items (CIs) that are subordinate to another, higher-level CI.
    • Members of a certain group. For example, you would use a tree picker to look up a user in the Service Desk group.
    • Reference elements for any hierarchical table. A hierarchical table is any table that has a parent field pointing back at itself. The Group [sys_user_group] table, for example, would be considered a hierarchical table because certain groups are children of parent groups.

    The following example shows how you would use a tree picker to assign an Incident record to a user in the Database group.

    You would first navigate to any Incident record and then enter Database in the Assignment group field.

    List field

    In this example, the Database group is a parent group with multiple child groups under it. When you select the search icon ( Search icon. ) next to the Assigned to field, a window displays reference fields in the Database group.

    Select fields

    Reference fields have the expand icon (+) next to their name. Clicking the + expands a list of the fields on that referenced field. In this example, expanding the Database Atlanta or Database San Diego fields opens a list of user records within each child group.

    Select referenced fields

    You would select any one of the user records to add it as a value in the Assigned to field.

    Dot-walked variable
    Note: You can configure the tree picker to pick up to 1,000 nodes when you configure the glide.ui.group_heirarchy.max_nodes property. To set the property, modify the dictionary entry for the field, and add tree_picker=true to the Attributes field. If there are multiple attributes, use a comma to separate them without any spaces between.

    Tags:

    Feedback
    On this page

    Previous topic

    Next topic

    • Contact Us
    • Careers
    • Terms of Use
    • Privacy Statement
    • Sitemap
    • © ServiceNow. All rights reserved.

    Release version
    Choose your release version

      Dot-walking examples

      • Save as PDF Selected topic Topic & subtopics All topics in contents
      • Unsubscribe Log in to subscribe to topics and get notified when content changes.
      • Share this page

      Dot-walking examples

      Access fields on a related table from a form, list, or script by dot-walking. This topic includes examples of the different ways you can dot-walk.

      List fields

      You can dot-walk to related fields in a list, such as the field list in a filter. This example demonstrates how to filter the Incident [incident] table by the company of the caller who registered the incident.

      When you open the list of fields that you want to filter, you see the list of available Incident table fields. The reference fields are followed by the related fields. For example, Caller is followed by Caller > User fields, which means that Caller is a reference field, and the related fields are user fields on the Caller record. If the related fields are not present in the list, you would select Show Related Fields at the bottom of the list.
      Show related fields
      When you select Show Related Fields, the menu reloads to display related fields.
      Related fields
      When you select a related field, the menu reloads with the fields of the related table.
      Related table fields

      When you select Company under Caller → User fields, the field then becomes Caller.Company.

      The following example shows where you are in the dot-walk. Each selected reference is stored at the top of the fields menu, and the number of dots preceding the field label indicate how many dots from the initial record the user has reached.
      Dot-walked field

      The example shows that the user is at Incident.Caller.Company. You can return to higher levels in the hierarchy by selecting fields located at the top of the menu. For instance, selecting Incident fields returns to the list of incident fields.

      The related fields can be removed by selecting Remove Related Fields at the bottom of the list.
      Remove related fields

      Condition builders

      You can make a detailed query on a table by dot-walking in the condition builder.

      To dot-walk in a condition builder, first select Show Related Fields on the fields menu. This action allows you to add fields from related tables to your query.

      The following GIF shows how you would dot-walk fields in a condition builder to find all Incident records assigned to one specific user, Beth Anglin. In the example, the user navigates to Incident > Open and then opens the condition builder. In the fields menu, the user first selects Show Related Fields and then opens the fields menu again to select Assigned to → User fields. The user opens the fields menu again to select Last name. The user builds the following condition: [Last name] [is] [Anglin]. After the user selects Run, the Incident list displays only the records assigned to Beth Anglin.

      The GIF demonstrates how to dot-walk in a condition builder,

      List collectors

      When selecting a list of fields from a list collector (for example, when you are configuring a form), you can dot-walk to fields from other forms.

      To see which fields are reference fields and can be dot-walked, look for green fields with a plus symbol.
      Reference fields
      Once a reference field is highlighted, the expand icon (Expand icon) appears above the add icon.
      Expand icon
      Selecting the expand icon opens the list of fields from the related list in the Available pane. The following example shows that the Assigned to fields were selected. The previous lists of fields appear at the top of the list.
      Lists of fields
      Once the field is added to the Selected pane, it appears with its full dot-walked syntax. The following example, shows that Assigned to.Active has been selected.
      Dot-walked field

      Scripts

      You can dot-walk within a script by invoking the dot-walk syntax. This functionality requires a knowledge of JavaScript.

      For scripts that run on the server side, such as business rules, it is necessary to add current.

      The following script, for example, is a scripted approval rule that requests an approval from the manager of the user who opened the ticket.
      try {
          current. opened_by. manager ; } catch (err ) { }
      For scripts that run on the client side, such as client scripts, current is not necessary. For instance, the following Highlight VIP Caller script runs on the client side.
      function onChange (control , oldValue , newValue , isLoading ) {
       
           //wait until there is a valid record in the field if (newValue ) {
       
             //get the caller object so we can access fields var caller  = g_form. getReference ( 'caller_id' ) ;
       
             var callerLabel  = document. getElementById ( 'label.incident.caller_id' ) ; var callerField  = document. getElementById ( 'sys_display.incident.caller_id' )
       
             //check for VIP status if (caller. vip == 'true' ) {
       
               //change the caller label to red background //style object is CSSStyleDeclaration, style names are not standard css names if (callerLabel )
                 document. getElementById ( 'label.incident.caller_id' ). style. backgroundColor = 'red' ;
       
               //change the caller's name field to red text if (callerField )
                 document. getElementById ( 'sys_display.incident.caller_id' ). style. color = 'red' ; } else { //not a VIP, remove temporary styles if (callerLabel )
                 document. getElementById ( 'label.incident.caller_id' ). style. backgroundColor = '' ; if (callerField )
                 document. getElementById ( 'sys_display.incident.caller_id' ). style. color = '' ; } } }

      Variables

      Often, you can add variables into templates, notifications, or other forms where a value is being called from the form.

      For example, ${assigned_to} is the variable for the Assigned to field.

      As shown in the example, you can dot-walk to fields on the original record of any reference field. It is possible to dot-walk to any field on the assigned_to record, for example, ${assigned_to.manager}.

      When you dot-walk, you can have a longer chain if you need it, as in this example: ${assigned_to.department.manager.mobile_phone}.

      Sometimes, you can select this variable from a tree picker.

      Tree pickers

      The tree picker interface has an expandable, hierarchical view that you can use to look up the following items:
      • Configuration Items (CIs) that are subordinate to another, higher-level CI.
      • Members of a certain group. For example, you would use a tree picker to look up a user in the Service Desk group.
      • Reference elements for any hierarchical table. A hierarchical table is any table that has a parent field pointing back at itself. The Group [sys_user_group] table, for example, would be considered a hierarchical table because certain groups are children of parent groups.

      The following example shows how you would use a tree picker to assign an Incident record to a user in the Database group.

      You would first navigate to any Incident record and then enter Database in the Assignment group field.

      List field

      In this example, the Database group is a parent group with multiple child groups under it. When you select the search icon ( Search icon. ) next to the Assigned to field, a window displays reference fields in the Database group.

      Select fields

      Reference fields have the expand icon (+) next to their name. Clicking the + expands a list of the fields on that referenced field. In this example, expanding the Database Atlanta or Database San Diego fields opens a list of user records within each child group.

      Select referenced fields

      You would select any one of the user records to add it as a value in the Assigned to field.

      Dot-walked variable
      Note: You can configure the tree picker to pick up to 1,000 nodes when you configure the glide.ui.group_heirarchy.max_nodes property. To set the property, modify the dictionary entry for the field, and add tree_picker=true to the Attributes field. If there are multiple attributes, use a comma to separate them without any spaces between.

      Tags:

      Feedback

          Share this page

          Got it! Feel free to add a comment
          To share your product suggestions, visit the Idea Portal.
          Please let us know how to improve this content

          Check any that apply

          To share your product suggestions, visit the Idea Portal.
          Confirm

          We were unable to find "Coaching" in Jakarta. Would you like to search instead?

          No Yes
          • Contact Us
          • Careers
          • Terms of Use
          • Privacy Statement
          • Sitemap
          • © ServiceNow. All rights reserved.

          Subscribe Subscribed Unsubscribe Last updated: Tags: January February March April May June July August September October November December No Results Found Versions Search preferences successfully updated My release version successfully updated My release version successfully deleted An error has occurred. Please try again later. You have been unsubscribed from all topics. You are now subscribed to and will receive notifications if any changes are made to this page. You have been unsubscribed from this content Thank you for your feedback. Form temporarily unavailable. Please try again or contact  docfeedback@servicenow.com  to submit your comments. The topic you requested does not exist in the release. You were redirected to a related topic instead. The available release versions for this topic are listed There is no specific version for this documentation. Explore products Click to go to the page. Release notes and upgrades Click to open the dropdown menu. Delete Remove No selected version Reset This field is required You are already subscribed to this topic Attach screenshot The file you uploaded exceeds the allowed file size of 20MB. Please try again with a smaller file. Please complete the reCAPTCHA step to attach a screenshot
          Log in to personalize your search results and subscribe to topics
          No, thanks Login