Sugar logic - getting value of multiselect

We're trying to do this in the Quote Line Items (QLI) module but it doesn't really matter which module.

We added a custom multiselect field to the QLI.  When a sales person creates a quote, they pick a product from the product catalog and it shows up on the quote.  They pick the quantity, add a discount, AND they can select product attributes from a multiselect.  This multiselect was originally a dropdown.

When the quote is saved, we want to populate the QLI "Description" field with a concatenation of the product catalog description field and the multiselect.  If the Product Catalog "Description" is "Compact drill press with feet controls" and the multiselect choices are "Blue", "6ft", and "Turbine", we want to concatenate them to "Compact drill press with feet controls, Blue, 6ft, Turbine."

When the attributes field was a drop-down, the formula was:

concat(related($product_templates_link,"description")," ",getDropdownValue("xxxx_product_attributes_list",$xxxx_product_attributes_c))

However, now that we've changed the attributes to a multiselect, we can't find the correct formula(s) to retrieve its values.  I've looked in the documentation and searches but can't find anything.  I'm sure it's easy and right in front of my face, but I've hit a wall.

I always appreciate all of your help in solving my (usually easy) problems.

Thank you!

  • Such a sugarLogic formula doesn't exist and it must be implemented accordingly.

    It is pretty possible to build a custom sugarLogic formula called implode(glue, list).

    We had implemented several generic and quite specific sugarLogic formulas on demand. We can implement this feature for you.

    Drop me a message if you are interested on that.

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • You can use the Suagr Logic function "toString". To calculate the concatenation of a name and a list of multiselect option you could use:

    concat($name,",",toString($attributes_c))

    I tried this in 10.3 and got the following:

    In Edit view: 

    And in Detail view:

    You just have to oversee the ^ chars :-)

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH

  • Hello 

    Let me show you how the Sugar platform can do the work according to your expectations - with no-code configuring.



    To make such videos (there are quite many of them in the Sugar Club), I perform a few simple steps:
    - draw the requested behavior in the Logic Builder tool in a form of a flowchart
    - get a Logic Builder- generated ZIP for the drawn flowchart in a click
    - install ZIP to some demo instance via regular Module Loader

    Here is the Logic Builder drawing (flowchart) that implements the logic have been requested - you may read it by following the white line (main flow):


    To make your customized Sugar instance perform in the way which the video recording shows, just let me know the real name of the xxxx_product_attributes field and I will provide you with ZIP - this is for free, nether licensing nor other fees required.

    It's quite easy for Sugar admin to go with drawing flowcharts solving many specific CRM tasks on their own.
    If you would like to explore the advantages of the Sugar platform configurability for non-developers that Logic Builder reveals, I may suggest signing up for Logic Builder here https://logicbuilder.integroscrm.com  and reach out to me for details


    Best Regards,
    Dmytro Chupylka

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