Value calculated according to what is selected in a multiselect field

Hi,  

FIrst of all, we are using sugar sells 12.1 hosted and I'm trying to achieve this calculation without code change (with calculated fields within studio or maybe with a Business Process..  I am unable to figure how to implement this and I have been scratching my head for 2 days.  Here is an example:

In the Opportunity module, I want to weight activities..  I created a drop down list with the following items

Mission 

Meeting

Plan

Mission weights 5 points , Meeting weights 5 points and Plan weights 10 points.  This drop down list is displayed to the user via a multiselect field.    Depending on what is selected, I want to sum up the points earned. 

I have looked at using isinlist, indexof but I am unable to find good logic to go through the items of the array and creating a spaghetti formula can be tedious.. (but maybe the only way).  So I started looking at it as a just a text field listing my items separated by commas and tried to use substr, strreplace (ie having the keys named such as 5Mission, 5Meeting, 10Plan) and adding the number part after extracting them but I am unable to find a way to search for the second or third item (I cannot find a way to extract after the second comma etc... ).. 

Is this even achievable in studio?    Unfortunately, we move to cloud and I am unable to code in php (or can I)? 

Thank you for your help..

  • I have solved my issue.. 

    Instead of using a Multiselect field, I created a drop down field per activity.  The drop down value is Yes or No and the key in the dropdown list is the value.. so Yes = 5 and No = 0.. Yes had a different weight for a few activities, so I created another dropdown list with Yes=10 and No = 0.  Default value for each activity field is No (0).  So my sum of points earned is a matter of add(activity1, activity2 etc..).. 

    The solution, unfortunately, is not elegant.. I would have loved to be able to use a multiselect instead of creating a gazillion amount of fields. but at this point, it is not possible as there are too many logic functions not available in studio...