Is it possible to have different options from a dropdown field available depending on the value of another field (where that other field is not a dropdown)?

Hello, I would like to be able to have different options appear from a dropdown field dependent on the value of another field (a TextField and a Relationship field).  I believe this will need to be done through development rather than through Studio.  Any help would be much appreciated.

  • It is going to be hard to do with a text field where the input can be pretty much anything the user wants to type.
    I've built dynamic dropdowns, where the list of items available is generated by a query or function of some kind, and I've done a multi-select dropdown whose options changed based on another dropdown as well as the standard depended dropdowns in Sugar. And yes, all but the last required some code.


    If you could tell me more about your use-case, perhaps an example, I may be able to help.

    FrancescaS

  • Hello Daniel,

    I'd agree with Francesca - the requested behavior is not out-of-the-box, and the assumption that one should need code development to Sugar is very logical - historically either SugarCRM itself invested in enhancing CRM capabilities or onother experienced developers could enhance Sugar - that is how it always has been for the system with open code and probably that is how the system reached top-level growing from the first line of code.

    I mean, usually if to prove the code enhancement as a reasonable investment, then there is a chance to benefit from a solution provided with custom code development

    However, IMHO the presence of Studio and SugarBPM for admins means that a low-code/no-code configuring approach applicable and makes sense for Sugar.
    Therefore, I would challenge the coding option with the no-coding option for your case too - let me show the example of the solution with no coding hoping that it could make sense as an alternative to the coding due to some advantages in place (but if you are a developer frankly there are none)

    Assume that we have 2 fields
    - Target - a field, which value to be selected from the dropbox
    - Source - a text field with some text - that text should effect of the dropdown list options of Target field

    I do add a third field
    - Intermediate - a service field we will use for the solution - also a dropdown field.

    I set Intermediate field as a Parent dropdown for the Target field, then define how the values of parent dropdown should manage the value of Target dropdown
    Like this:

    All of the above could be configured with no-code in Studio and installed into Sugar with "Save-and-Deploy"

    Now, I employ the low-code tool Logic Builder - to configure a logic hook and also "Save-and-Deploy" it into SUgar (the path to deploy logic hook is a little bit longer - to create zip in a click and to use Module Loader to install)
    This logic hook will populate the Intermediate field with the Source field value on record save.

    So what we have as result?

    As soon as the value in the Source field receives the value with either Save in the UI or with a REST API call, an Intermediate field gets the same value and, consequently, this will limit the values of the Target's field dropdown in the UI.

    Regarding the advantages of the solution - all the values for the dropdowns (and consequently all the logic) are manageable via the no-code tool of Studio - just add new items to Intermediate field dropdown and rearrange Target's dropdown values through them

    If this no-code approach makes sense for you and you have no access to Logic Builder yet, just tell me the name of the Module the fields belong to and the real names of Source and Intermediate fields and I will provide with zip
    Or, you can just sign up for https://logicbuilder.integroscrm.com  and drop me a line so that we configure a logic hook together

    I hope this helps

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

  • Dependency SetOption dos the job. We implement that very often.

    André Lopes
    Lampada Global
    Skype: andre.lampada