+ Start a Discussion
Leonard Silon 16Leonard Silon 16 

expected boolean and received text

I am trying to capture the previous and current values of a field if it changes. CAN NOT use native FHT, or FAT or anything else. I must do this with process builder. Below is the formula I am trying to use and under that the error  I get.

If anything but a check box, I am good. However, the checkboxes I can not get to work.

CODE=

FieldA is a Boolean field

IF(       OR(
                      ISNEW(),
                AND(
                     FieldA = TRUE, 
                      PRIORVALUE(FieldA)  = FALSE            
                       )
                 ),
"TRUE",

IF(       OR(
                      ISNEW(),
                AND(
                     [FieldA = FALSE, 
                      PRIORVALUE(FieldA)  = TRUE
                       )
                 ),
"FALSE",  FieldA))

ERROR:
The formula expression is invalid: Incorrect parameter type for function 'IF()'. Expected Text, received Boolean

 
Best Answer chosen by Leonard Silon 16
Arun ParmarArun Parmar
Hi Leonard Silon 16,

in you formula you are using "FALSE", "TRUE" basically these will treated as string and your field is boolean type. please change these strings to boolean. 
i hope this will help you.

All Answers

Arun ParmarArun Parmar
Hi Leonard Silon 16,

in you formula you are using "FALSE", "TRUE" basically these will treated as string and your field is boolean type. please change these strings to boolean. 
i hope this will help you.
This was selected as the best answer
Leonard Silon 16Leonard Silon 16
Perfect - thanks!
Arun ParmarArun Parmar
Please mark as best answer if helpful.
Thanks