1 Reply Latest reply on Sep 7, 2018 8:24 AM by lgtandi

    Incident - Validation help - OK if 0 Tasks

    MarkLarvo Specialist

      Good afternoon,

       

      Not sure. Hoping for some clues...

       

      We need a validation on Incident:

      1. Not Closed, Resolved or Cancelled OR
      2. All tasks are completed OR
      3. Closed, Resolved or Cancelled && No Tasks

       

      $(Status not in ("Closed",  "Resolved",  "Cancelled") ||  IsTrueForAllChildren("Incident#",   RecId,   "Task#Assignment.Rev3",   $(Status in ("Completed",  "Cancelled",  "Rejected"))) ||   ChildFold("Incident#",  RecId,  "Task#Assignment.Rev3",  $("1"),  "+") == 0)

       

      1 and 2 are working. #3 is to be added is not doing what I want. :-(

       

      I've tried extra qualifiers and seem to be failing. Quite simply how do I make a validation rule that checks for 0 tasks?

       

      Thanks - Mark!

        • 1. Re: Incident - Validation help - OK if 0 Tasks
          lgtandi Specialist

          I think the second dollar sign is wrong, just try the following expression:

           

          $(Status not in ("Closed",  "Resolved",  "Cancelled") ||  IsTrueForAllChildren("Incident#",   RecId,   "Task#Assignment.Rev3",   $(Status in ("Completed",  "Cancelled",  "Rejected"))) ||   ChildFold("Incident#",  RecId,  "Task#Assignment.Rev3",  "1",  "+") == 0)