I tried to calculate the total hours for each leader, and as in the salesforce there is no data about "number of team members", so I want to input it manually like this:
Case(Owner_Manager_Name__c, "Mary", 10, "Terry", 12, "Henry", 9, 0)
And I got such error:
Incorrect parameter type for function 'Case()'. Expected Object, received Text
My guess is, "Owner_Manager_Name__c" has the type of "Object" while "Mary"/"Terry" are Text. But when I check in salesforce by using Salesforce Inspector, the type of "Owner_Manager_Name__c" is string.
How can I fix this??
Hi @Danmu Wu
It's possible Owner_Manager_Name__c is a picklist or relationship field. Try wrapping it in the text function i.e.
Case(
TEXT(Owner_Manager_Name__c),
"Mary", 10,
"Terry", 12,
"Henry", 9,
0
)
https://trailhead.salesforce.com/content/learn/modules/advanced_formulas/picklist_formulas