New for Sugar 6.5: Create dependent dropdowns using Sugar Logic in Studio

sugarcrmdevelopers —  May 3, 2012 — 23 Comments

Sugar Logic has a number of improvements coming in Sugar 6.5, but I think the biggest one for those who use the tool is the new ability to create dependent dropdowns now thru Studio and Module Builder. I can’t tell you how many times I’ve heard this feature requested, and until now it was only possible thru code level customizations. Now by adding the editor right into Studio, anyone can build and maintain a depend dropdown field in seconds.

So let’s take a look at how it works. To do this, we’ll need two dropdown fields in your module; one which is the parent field which drives the values available in the child field, and then the child field which has a list of all of the possible values. After creating the parent field first, we’ll create a new child field, taking note of a new option available…

You’ll see the familiar ‘Dependent Field’ now has two options. You’ll see the classic ‘Formula’ entry, which also you to enter in a normal Sugar Logic formula to determine visibility, and then a new option ‘Parent Dropdown’ which let’s you define a field to drive which options are available in the dropdown. If you select ‘Parent Dropdown’, you’ll have the option to pick the parent field which will work with this field.

Now click ‘Edit Visibility’ to pick which fields to show in this child field when a particular parent field value is selected, using the grid shown below.

The UI is pretty simple here; just drag fields from the ‘Available Options’ box in to one of the boxes under the options from the parent field. The list of options listed in the parent field boxes represents the options available in the child field when that option is selected in the parent field. In other words, if I select ‘Analyst’ in the parent field, the only options available in child field will be ‘Call’, ‘Task’, and Meeting’.

You can see this in the UI by saving this field and adding it to the EditView for the module. Then by going to the UI you can try this out.

Then by changing the ‘Type’ field to ‘Customer’ we get a different list of options in the Test Dropdown.

And if you select a field that doesn’t have any child field values assigned to it, the child field disappears.

This feature now extends what cool things Sugar Logic can already do, making it a very powerful feature for users that is easy to use and setup.

And that’s not all for Sugar Logic in 6.5. Stay tuned to this blog for a few more developer features that will help your use of Sugar Logic in your organization.

23 responses to New for Sugar 6.5: Create dependent dropdowns using Sugar Logic in Studio


    Is it possible to define different default values for my dependent field? Let’s say I want to set the default value to “Task” for Type=”Customer” and to “Meeting” for “Analyst”.


    CE or only Pro, Ent?


    -10..vTiger has dependent dropdowns


    Can dependencies be driven by a field value in a related entity?  e.g.  a list of available contact-types, depends on the Org-type of the Org this contact belongs to.

      David Wheeler June 12, 2012 at 3:37 pm

      You can have a dependent field based on a related value, but you can’t have dropdown options change based on a formula without quite a bit of effort. 

      If you are ok with delving deep into SugarLogic, you can create a custom dependency that uses the SetOptionsAction to change the options of a dropdown field based on as complex a formula as you want (including the use of related fields). See Chapter 5 of the dev docs for more info.

      As for implementing a dependent dropdown in 6.4, you can use the technique shown in this blog post:

      Dependent fields created this way will show up and be editable in 6.5 studio .


    How do you define something like this in code? (i.e. directly in the vardefs.ext.php)


    I have sugarcrm (version 7.1.6) and this option is not working correctly.
    Whenever a value is selected from the parant drop down, the child dropdown does not filter accordingly, it keeps on showing the entire list


    In my sugarcrm, dependent and parent dropdown option in edit field are not appear. My sugarcrm is community edition, is it a reason for that?


    It will be very helpful if you could tell me that In which file or folder this visibility editor saves the data?

Trackbacks and Pingbacks:

  1. dependent dropdown list - May 7, 2012

    […] […]

  2. Dependable drop-down lists. - July 2, 2012

    […] […]

  3. DropDown - July 12, 2012

    […] […]

  4. How to configure ot develop filtered dropdown from Accounts or any module - August 15, 2012

    […] […]

  5. Dependent dropdowns in 6.5 in code, how? - August 29, 2012

    […] […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s