- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
01-02-2013 05:05 PM
I have three different fields dependencies. Each has a score associated with it. Each are picklists
1. Core product score ( 0, 1, 2)
2. Sub Segment (o, 1, 2)
3. Product Class score (0, 1, 2)
Say for example the the numbers come out as followed..
Core Product score = 1
Sub Segment score = 2
Product Class score=1
Total Score= 4
I'm trying to put in a validation fule on the field "TOTAL SCORE" which would calculate/sum these three fields.
Thanks in advance!
Solved! Go to Solution.
01-02-2013 11:30 PM - edited 01-02-2013 11:31 PM
Try this formula .
Make the total score return type as number and put this formula.
Then the total score will be the sum of all the three picklist values.
value(text(Product_Class_score__c ))+value(text( Sub_Segment_score__c) )+value(text( Core_product_score__c))
01-03-2013 08:53 AM
Please let me know if this is correct. I went to the Field TOTAL SCORE and put in the formula below and this is my error..
(value(text(Product_Class_score__c ))+value(text( Sub_Segment_score__c) )+value(text( Core_product_score__c))
Error: Field Product_Class_score__c may not be used in this type of formula
Not sure I understand your statement of "Make the total score return type as number". Could you please elaborate?
Thanks in advance!
01-03-2013 09:42 PM
Can you tell me Product_class_score__c is a picklist field or not.
what type of field is total score.
Are you doing the sum of all the fields with formula fields or with apex.
01-04-2013 10:03 AM - edited 01-04-2013 10:05 AM
i think You need the count of three picklist fields as result in total score.
So please create a formula field as total score and make the return type as number and put the above form.
its already working fine in my instance.
You want sum of three fields so sum output is the number so that is the reason i told you to make return type as number.
01-04-2013 10:57 AM
what i mean to say u have three picklist fields and with value 1,2,1 then if u want the total score as 4 .
then you need a formula field to calculate the above three values and show as 4.
The total score field should be a formula filed then only you will get the output as 4.
so 4 is a numeric value when you create a formula field it will ask you what u want to return,like date,text,number or currency.
so if you mention number while creating formula field then you will get 4 as output.
Hope you understood this.