0

This formula works for all my requirement except the underlined part:

IF( AND(RecordType.Name = 'Solutions', 
        DATEVALUE(Account.CreatedDate) <= TODAY() - 10, 
        CreatedBy.Profile.Name = "Perkins Access Standard User", 
        ISPICKVAL( StageName , 'Won Completed'))  ,
   "existing customer", 
   "new customer")

I need a formula that marks customer "existing customer" if- record type is "Solutions. Created date (on account) was created more than 10 days from today, Created by a user with the Perkins Access Standard User profile, and that has an opportunity stage of "Won completed" or "Won in Progress" or "Won Pending start". Customers that don't meet that criteria should be marked "New Customer"

But I'm having trouble adding the opportunities that have a stage of Won in Progress" or "Won Pending start".

1

You need to add an OR() formula around the picklist values you're interested in including.

    ISPICKVAL(StageName , 'Won Completed'))  ,

becomes

OR(ISPICKVAL(StageName , 'Won Completed'),
   ISPICKVAL(StageName , 'SomeOtherStageToInclude'),
   ISPICKVAL(StageName , 'YetAnotherStage'),
   ISPICKVAL(StageName , 'AndSoOnAndSoOn')),

This will evaluate to true if any of the arguments is true.

  • I'm embarrassed to say, but I think I still didn't do it right. This is what I have- – jlh123 Jun 19 '18 at 19:54
  • IF( AND(RecordType.Name = 'Solutions', DATEVALUE(Account.CreatedDate) <= TODAY() - 10, CreatedBy.Profile.Name = "Perkins Access Standard User", OR(ISPICKVAL(StageName , 'Won Completed'), ISPICKVAL(StageName , 'Won in Progress'), ISPICKVAL(StageName , 'Won Pending start') "existing customer", "new customer"))) – jlh123 Jun 19 '18 at 19:54
  • and it is giving me this error- Error: Incorrect parameter type for function 'OR()'. Expected Boolean, received Text – jlh123 Jun 19 '18 at 19:54
  • You're just missing a parenthesis after the third record type. – David Reed Jun 19 '18 at 19:56
  • it is still giving me the same error- Error: Incorrect parameter type for function 'OR()'. Expected Boolean, received Text – jlh123 Jun 19 '18 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.