-1

EDIT: I forgot to mention that my workflow rule Date options that it currently returns NOW() but i need to check if the user have removed field1__c and field2__c then set that to be null otherwise NOW()

I am trying to check a formula value in a workflow rule that will evaluate two fields. A boolean field and a text field, if both are empty then set the value to ''

AND(field1__c = false, ISBLANK(field2__c), '')

error:

Error: Incorrect parameter type for function 'AND()'. Expected Boolean, received Text

5
  • Is it what you do for a workflow trigger or a formula field? These are 2 different animals. Please describe what you are trying to do, not just that ask for a formula.
    – o-lexi
    Mar 23, 2016 at 17:39
  • workflow rules->field updates
    – Nick
    Mar 23, 2016 at 17:41
  • Ok, so the field you want to set to Null should not be a formula returning NOW(), can you please provide more details on the logic for your case? It looks for me that what you are looking for is not a WF to update the field, you might just need to modify the formula field returning NOW() to be like this IF(AND(NOT(field1__c), ISBLANK(field2__c), NULL, NOW()) and it should be a DateTime type
    – o-lexi
    Mar 23, 2016 at 17:47
  • let me update my question
    – Nick
    Mar 23, 2016 at 17:48
  • @NickKahn is this issue resolved ?
    – Ratan Paul
    Mar 26, 2016 at 15:41

3 Answers 3

2

It looks like you are wanting to set the value of a formula field if the AND(field1__c = false, ISBLANK(field2__c)) argument is true, if this is the case you might want to consider using an IF( condition, value if true, value if false ) something like this may work:

IF(AND(field1__c = false, ISBLANK(field2__c)), '', NOW()) 

This may work however from your question it wasn't clear what the false condition was so i have left this with a generic string which you would need to change to be your desired false outcome.

Edit to show the correct NOW() outcome.

1
  • the false condition is datetime and i have the above formula like IF(AND(field1__c = false, ISBLANK(field2__c)), '', NOW()) or IF(AND(field1__c = false, ISBLANK(field2__c)), null, NOW()) but its not updating the field?
    – Nick
    Mar 23, 2016 at 17:38
1

Your third parameter is single quote '' means it is consider as text

You just need to remove it

AND(field1__c = false, ISBLANK(field2__c))

Updates

IF(AND(field1__c = false, ISBLANK(field2__c)), '', NOW()) 
7
  • I have added more info to make it little bit clear, after you post your answer I realized that its not clear enough.
    – Nick
    Mar 23, 2016 at 17:22
  • @NickKahn check my updated ans..'
    – Ratan Paul
    Mar 23, 2016 at 17:24
  • @NickKahn sure let me know if this worked or not.
    – Ratan Paul
    Mar 23, 2016 at 17:26
  • the false condition is datetime and i have the above formula like IF(AND(field1__c = false, ISBLANK(field2__c)), '', NOW()) or IF(AND(field1__c = false, ISBLANK(field2__c)), null, NOW()) but its not updating the field?
    – Nick
    Mar 23, 2016 at 17:38
  • @NickKahn is your field1__c boolean false and field2__c is blank ?
    – Ratan Paul
    Mar 23, 2016 at 17:41
0

I think you are looking for something like

IF(AND(field1__c = false, ISBLANK(field2__c)),  '' ,  -value if false-  )
1
  • yes i'm looking similar and i have updated my question
    – Nick
    Mar 23, 2016 at 17:22

You must log in to answer this question.

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