1

I'm trying to figure out a formula in process builder where the custom object name AidTrack_Call__c field's value of Year__c, has been changed from 2018.

The formula listed below produces this error on Save:

The formula expression is invalid: Incorrect parameter type for function 'Year()'. Expected Date, received DateTime

ISPICKVAL([AidTrack_Call__c].Year__c,"2018") && Year([AidTrack_Call__c].SystemModstamp) = Year(Today())

How can I update the formula to get what I'm trying to resolve? Thanks!

2 Answers 2

3

Try using this and it will work fine -

ISPICKVAL([AidTrack_Call__c].Year__c,"2018") && Year(DATEVALUE([AidTrack_Call__c].SystemModstamp)) = Year(Today())
1
  • Was the DATEVALUE part of the key in correcting my formula? Thank you!
    – rouqeOne
    Mar 13, 2019 at 9:05
0

Just make the formula something like:

ISCHANGED([AidTrack_Call__c].Year__c) && [AidTrack_Call__c].Year__c != "2018"
2
  • Hi Phil W this is the error I received: The formula expression is invalid: Field AvidTrack Call is a picklist field. Picklist fields are only supported in certain functions.
    – rouqeOne
    Mar 13, 2019 at 8:58
  • @rouqeOne, according to other posts picklist fields are themselves compatible with ISCHANGED. Now that I understand that AidTrack_Call__c is a picklist field, I am confused by why you are accessing a Year__c field within it... AFAIK a picklist field is a leaf node in the schema; you can't have fields within it. What does this apparently-in-the-picklist Year__c field represent?
    – Phil W
    Mar 13, 2019 at 17:16

You must log in to answer this question.

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