1

I am trying to create a workflow rule for a field update when the Lead Owner is changed from a Queue to a user only when the Queue owner = certain queues. Here is what I have so far:

AND(
ISCHANGED(Owner_Name__c), 
(PRIORVALUE(Owner_Name__c) = 'Queue - Inform') OR
(PRIORVALUE(Owner_Name__c) = 'Queue - Qualifa') OR
(PRIORVALUE(Owner_Name__c) = 'Queue - Televerde') OR
(PRIORVALUE(Owner_Name__c) = 'Queue - Market One'))

What am I doing wrong?

5
  • 1
    What is the problem? Mar 11, 2016 at 20:48
  • It's the Syntax Errors i keep receiving. First its: Missing ')' Mar 11, 2016 at 20:59
  • Try replacing OR with || Mar 11, 2016 at 21:01
  • I tried that as well AND( ISCHANGED(Owner_Name__c), (PRIORVALUE(Owner_Name__c) = 'Queue - Inform') || (PRIORVALUE(Owner_Name__c) = 'Queue - Qualifa') || (PRIORVALUE(Owner_Name__c) = 'Queue - Televerde') || (PRIORVALUE(Owner_Name__c) = 'Queue - Market One')) Error: Formula result is data type (Boolean), incompatible with expected data type (Text). Mar 11, 2016 at 21:02
  • See @Adrian's post below.... that's what I would've done, too. Mar 11, 2016 at 21:03

1 Answer 1

3

That's not how OR syntax works. You pass it a bunch of clauses and if any of them are true, it returns true (e.g. OR(condition1, condition2)). It's just like AND (notice you already use AND(condition1, condition2)). So your formula should be:

AND(
    ISCHANGED(Owner_Name__c),
    OR(
        (PRIORVALUE(Owner_Name__c) = 'Queue - Inform'),
        (PRIORVALUE(Owner_Name__c) = 'Queue - Qualifa'),
        (PRIORVALUE(Owner_Name__c) = 'Queue - Televerde'),
        (PRIORVALUE(Owner_Name__c) = 'Queue - Market One')
    )
)
5
  • 1
    You JUST beat me to it (see my comment above). Upvoted. Mar 11, 2016 at 21:02
  • thanks I changed it to that and got this error: Error: Formula result is data type (Boolean), incompatible with expected data type (Text). Mar 11, 2016 at 21:04
  • @ShelleyHolloway You're using this formula in your evaluation of whether or not to fire the WFR?
    – Adrian Larson
    Mar 11, 2016 at 21:06
  • The rule criteria is set to TRUE and I'm using it on action to for field update Mar 11, 2016 at 21:10
  • @ShelleyHolloway You should use the above as your criteria instead of TRUE.
    – Adrian Larson
    Mar 11, 2016 at 21:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .