You need to sign in to do that
Don't have an account?
Sabrent
PRIORVALUE ISPICKVAL CONTAINS
I have a custom picklist field Status__c with 6 values ActiveA, ActiveB,ActiveC,ClosedP,ClosedQ,ClosedR
I am trying to write a Workflow rule such that when Status__c is changed from any of the Active values to the Closed values, populate the Closed_Date__c field with date today().
This is my workflow rule but it is giving syntax error
Error: Field Status__c is a picklist field. Picklist fields are only supported in certain functions.
AND(
ISCHANGED(Status__c), ISPICKVAL( PRIORVALUE(CONTAINS(Status__c,"Active"))), ISPICKVAL(CONTAINS(Status__c,"Closed"))
)
I am trying to write a Workflow rule such that when Status__c is changed from any of the Active values to the Closed values, populate the Closed_Date__c field with date today().
This is my workflow rule but it is giving syntax error
Error: Field Status__c is a picklist field. Picklist fields are only supported in certain functions.
AND(
ISCHANGED(Status__c), ISPICKVAL( PRIORVALUE(CONTAINS(Status__c,"Active"))), ISPICKVAL(CONTAINS(Status__c,"Closed"))
)
in the workflow rule you can use this:
AND(
CONTAINS(TEXT(PRIORVALUE(Status__c )),"Active"),
CONTAINS(TEXT(Status__c ),"Closed"))
regards,
Agi
All Answers
OR(
ISPICKVAL(Status, 'ActiveA'),
ISPICKVAL(Status, 'ActiveB'),
ISPICKVAL(Status, 'ActiveC')
)
You would do the same for the isClosed field. Now you have a field on the object that tells you if it is active or closed, your formula for your workflow rule becomes much simpler. Something like below would work
AND(
ISCHANGED(Status__c),
isActive__c = false,
PRIORVALUE(isActive__c) = true,
isClosed__c = true
)
in the workflow rule you can use this:
AND(
CONTAINS(TEXT(PRIORVALUE(Status__c )),"Active"),
CONTAINS(TEXT(Status__c ),"Closed"))
regards,
Agi