Adding a Blank (NULL) Value as the First Value of a Dropdown List

    Overview

    Sugar® allows you to add a blank (NULL) value as the first field of a dropdown list via Studio and the Dropdown Editor. The blank value should be the first item of the list so that when the dropdown list is used for a required field, the user will be forced to make a selection rather than allowing the field default to a non-null value. This article will cover how to add a blank (NULL) value to a dropdown list via Studio and the Dropdown Editor.

    For more information on editing dropdown lists, please refer to the Developer Tools documentation. 

    Prerequisites

    You must be an administrator or have developer-level role access in Sugar to make the necessary changes via Studio and the Dropdown Editor. 

    Steps to Complete

    You can add a blank value to a dropdown list being used by a particular field by editing the field via Studio. As an alternative, you may also edit the dropdown list directly via the Dropdown Editor. The following steps below outline the process from both areas in Sugar.

    Adding a Blank Value to a Dropdown List Via Studio

    1. Navigate to Admin > Studio > {Module Name} > Fields.
      Note: For this example, we will select the Bugs module.
    2. Select the dropdown field associated with the dropdown list you wish to edit or create a new dropdown field.
      Note: For this example, we will select the Priority field. 
    3. Select the dropdown list where you would like to add the blank value. Click the Edit button or create a new dropdown list by clicking the Add button.
      Note: For this example, we will edit the dropdown list. 
      Studio BugPriority DD EditAdd
    4. Without filling any values in the Item Name and Display Label fields, click “Add”.
      Studio Bug Priority DD Add
    5. Drag and drop the blank field as the first item of the list then click “Save”.
      Studio Bug Priority DD BlankValue

    Adding a Blank Value to a Dropdown List Via the Dropdown Editor

    1. Navigate to Admin > Dropdown Editor.
    2. Select the dropdown list to which you want to add a blank value or create a new one by clicking the Add Dropdown button.
      Note: For this example, we will select the bug_priority_dom dropdown list.
      DDEditor BugPriority
    3. Without filling any values in the Item Name and Display Label fields, click “Add”. 
      DDEditor Bug PriorityDD Add
    4. Drag and drop the blank field as the first item of the list then click “Save”. 
      DDEditor BugPriorityDD BlankValue

    Application

    Once the necessary changes have been made, navigate to the specific module to confirm that the blank (NULL) value displays as the first field of the dropdown list. For this example, the Priority field in the Bugs module should now display the blank value as the first field of the dropdown list.

    in Studio and Module Builder

    Reach out to us for help