Skip to content
The Chat Archive
gpt-4o-2024-05-13· OpenAIAi2 WildChat-4.8M (AI2)

Prevent dot walk field to edit on list view in hardware table

  1. User

    Prevent dot walk field to edit on list view in hardware table

  2. Assistant

    To prevent dot-walked fields from being editable in the list view on a hardware table (or any other table) in a platform like ServiceNow, you can follow these steps:

    Method 1: Use UI Policies

    UI Policies allow you to control the behavior of fields on forms and can also be applied to list views.

    1. Navigate to UI Policies:

      • Go to System UI > UI Policies.
    2. Create New UI Policy:

      • Click on the New button to create a new UI policy.
      • Fill in the necessary details such as the table (e.g., the Hardware table) and conditions (if any).
    3. Add UI Policy Actions:

      • In the UI Policy form, scroll down to the UI Policy Actions related list.
      • Create new actions to set the fields as Read Only.
      • Make sure to add actions for each field that you want to be read-only in the list view.
    4. Activate the UI Policy:

      • Make sure the UI policy is active by setting the Active checkbox to true.
      • Save the UI policy.

    Method 2: Use Dictionary Attributes

    In some cases, you might prefer to set dictionary attributes for specific fields to make them read-only at the dictionary level.

    1. Navigate to Dictionary:

      • Go to System Definition > Dictionary.
    2. Find Specific Fields:

      • Search for the specific dictionary entries (fields) you want to make read-only.
    3. Set Attributes:

      • Open the dictionary entry for the field.
      • In the Attributes section, set necessary attributes to make the field read-only.

    Method 3: Use ACLs (Access Control Rules)

    Access Control Rules can also be used to restrict field-level permissions.

    1. Navigate to Access Control:

      • Go to System Security > Access Control (ACL).
    2. Create New ACL:

      • Click New to create a new ACL.
      • Fill in the necessary details such as the table name (e.g., Hardware table), field name, operation (read), and any specific conditions.
    3. Set Permissions:

      • In the Script section, define the conditions under which the field should be read-only.
      • For example:
        answer = true; // This will make the field read-only for everyone
        
    4. Save the ACL:

      • Ensure the ACL is active and save it.

    Considerations:

    • Dot-Walked Fields: Be aware that dot-walked fields are a bit different in behavior. You may need to customize and ensure the parent table's ACLs and UI policies are adequately set.
    • Testing: Always test these configurations in a non-production environment to ensure they behave as expected.
    • Security: Be cautious with setting access control as it could impact user experience and business processes.

    By following these methods, you can effectively prevent dot-walked fields from being editable in the list view of the hardware table.