1 Reply Latest reply on May 8, 2018 7:58 AM by DTurner

    Enforce a task for an Incident

    mbath61 Apprentice

      I am trying to require a task linked to an Incident using a validation rule as pbeard mentions in this article https://community.ivanti.com/thread/49658?q=enforce%20tas

       

      this is his content

      ***********************

      I was able to get this to work for Incident, but not a Service Request. Basically I have a Business rule, Validation expression to use the ChildFold to evaluate how many tasks are linked to its Parent.  This code works great on an incident but does not work on a request.

      Here is my incident expression: which works great

       

      $(if ChildFold("Incident#",

                     RecId,

                     "Task#Assignment.Rev3",

                     "1",

                     "+",

                     "") >

           0

        then true

        else false)

      ***********************

      But pasting it in is giving me a series of errors I haven't been able to untangle yet.

      It doesnt display the placeholder (1) and (2) marker, so no help there. Extra paren at the end errors specifically against it, surrounding the ChildFold...0 fails

       

      Removign the if/then/else to simplify the description as

              $(ChildFold("Incident#", RecId, "Task#Assignment.Rev3","1", "+", "") > 0⁽¹⁾

      yields

      Adding a right-hand paren returns all the simplification errors from above.

       

      So what am I missing here, gang?

        • 1. Re: Enforce a task for an Incident
          DTurner Expert

          Hi mbath61,

           

          You shouldn't need the last ""; "> 0" should be stored within the expression.

           

          Sometimes the simplify does some weird stuff - just try copying:

          $(ChildFold("Incident#",  RecId,  "Task#Assignment.Rev3",  "1",  "+") > 0)

           

          and click Save.

           

          Other than that, I'd just suggest making sure the parent ref and relationship specifier are accurate.