function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bakumbakum 

Help I'm being driven slowly mad by a workflow

HI, I've got a workflow that is evaluating to false and I have no idea why.  Can you help?

OR (
          ISNULL(Guest_Name__r.Most_Recent_Reservation__c),
          Guest_Name__r.Most_Recent_Reservation__r.Departure_Date__c < Departure_Date__c
       )

Value(s) Found: Departure_Date__c=2008-11-11 00:00:00, Guest_Name__r.Most_Recent_Reservation__c=null, Guest_Name__r.Most_Recent_Reservation__r.Departure_Date__c=null

Criteria evaluates to false?!?!?

Substitute the Values Found in the formula and get this:
OR (
          ISNULL(null),
          null < 2008-11-11 00:00:00
      )

Why isn't this evaluating to true!?!?!

Thanks,
-mb
NewbsterNewbster
I've had issues with the ISNULL function as well...  try using LEN instead...

So something like LEN(Guest_Name__r.Most_Recent_Reservation__c) = 0;

Good luck.

JV
bakumbakum
ISNULL(Guest_Name__r.Most_Recent_Reservation__c) is a lookup field, which is a text field (sort of) which means it's never null.  It's empty.  ISNULL(Guest_Name__r.Most_Recent_Reservation__c) will never be true, even when the field is empty. 

Guest_Name__r.Most_Recent_Reservation__c = "" evaluates to true when the field is empty.
werewolfwerewolf
So are you saying your issue is solved then?  It's true that ISNULL on a text field does not evaluate to true when the text field is empty.
bakumbakum
Yep, exactly.  Issue solved.

Lookup fields count as Text fields where the question are they empty or not is concerned.