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

bsoremsugar —  May 3, 2012 — 19 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.

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

  1. 

    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”.

  2. 

    CE or only Pro, Ent?

  3. 

    -10..vTiger has dependent dropdowns

  4. 

    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.

      http://developers.sugarcrm.com/docs/ENT/6.4/-docs-Developer_Guides-Sugar_Developer_Guide_6.4.0-Sugar_Developer_Guide_640.html#9005378

      As for implementing a dependent dropdown in 6.4, you can use the technique shown in this blog post: http://developers.sugarcrm.com/wordpress/2011/06/09/learning-sugar-logic-dynamic-dropdown-subindustry-field/

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

  5. 

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

  6. 

    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

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:

WordPress.com Logo

You are commenting using your WordPress.com 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