Learning Sugar Logic: Dynamically visible “Other Industry” field

sugarcrmdevelopers —  June 8, 2011 — 7 Comments

One of the bug new features for Sugar Logic in 6.2 is the ability to create dynamically visible fields in studio. For example, if we have a dropdown like the Industry field of accounts that has an other option, it would be nice to have an “other” field appear to specify what this other industry value is. In order to do this in 6.2, all we need to do is create a new “Other Industry” field, set the Dependent checkbox, and enter the “Visible If” of:

equal($industry, "Other")

Once added to the Edit and Detail views, the other industry field will appear only for records that have an industry value of “Other” (Based on the key, not the translated value. The formula will still work when using Sugar in languages besides English).  Another tip is to place dynamic fields on their own row (with no filler fields). This way, the entire row will disappear when the field is not visible and reduce empty space on your layouts.

 

7 responses to Learning Sugar Logic: Dynamically visible “Other Industry” field

  1. 

    I’m trying to figure out how to have a dependent field display only if a box is checked, but I can’t figure out the formula. I”ve tried:
    equal($checkbox_field_name, “1”)andequal($checkbox_field_name, 1″)
    Neither seem to work. What is value for a checked box?

  2. 

    Sorry, those formulas don’t look right I meant… equal($checkbox_field_name, “1”) and equal($checkbox_field_name, 1). Any help would be appreciated! Thanks.

  3. 

    I also am trying to find the formula for if a checkbox is checked, ive tried the same as cmags17 
     equal($checkbox_field_name, “1”)
     equal($checkbox_field_name, 1)
    and also all alpha combinations
     equal($checkbox_field_name, “Y”) equal($checkbox_field_name, Y)
    none work, and of course theres zero documentation to be found, can we get an answer?

  4. 

    I’m having the same issue with checkboxes….

  5. 

    for check boxes I find that equal($checkbox_field_name, true)  seems to work.

  6. 

    I’m trying to do this with a similar situation – if the Marital Status dropdown menu selection is “MARRIED,” then I want a text field to appear where the user can enter their spouse’s name – easy, right?
    Here’s the formula I have, but it’s not working. I’m probably missing something stupid simple, as this syntax is identical to that above. I am, however using 6.5

    equal($marital_status_c,”Married”)

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