1 Reply Latest reply on Sep 30, 2016 3:49 AM by florian1

    Prompt PIR Required when trying to close off Change Requests

    elysey Apprentice

      Been staring at the screen for a few hours now and I am now officially stumped

      The requirement here is to prompt a user that a PIR review needs to be completed before any non minor changes can be closed off i.e. if status of a Change is set to Closed and the type is not minor and no PIR has been done or a PIR has been done but not in a completed status, then show the prompt and prevent them from saving.

       

      I'm using the Validation On Save rule for this and have tried the following combination already:

       

      $(Status != "Closed" || TypeOfChange != "Minor" ||
        ChildFold("Change#",  RecId,  "PIR#.",  1,  "+",  "$(RecId != '')") > 0 ||
        IsTrueForAllChildren("Change#",  RecId,  "PIR#.",  "$(Status != 'Completed')"))
      
      

       

       

      $(Status != "Closed" || TypeOfChange != "Minor" || IsTrueForAllChildren("Change#",  RecId,  "PIR#.",  "$(Status != 'Completed')"))
      
      

       

      $(Status != "Closed" && TypeOfChange != "Minor" || 
        IsTrueForAllChildren("Change#",  RecId,  "PIR#.",  "$(Status != 'Completed')"))
      
      

       

      $(Status != "Closed" || TypeOfChange != "Minor" ||
        ForEachChild("Change#",  RecId,  "PIR#.",  "Status",  "") != "Completed")
      
      

       

      Have tried switching the or conditions to ands as well but still no dice.

      Any thoughts?  Definitely sure I'm missing something here

        • 1. Re: Prompt PIR Required when trying to close off Change Requests
          florian1 Expert

          Try using TypeOfChange == "Minor" instead. Otherwise the condition will always become true for non-minor Changes.

          Stick with ChildFold and add the PIR status condition there:

           

          $(Status != "Closed" || TypeOfChange == "Minor" ||
            ChildFold("Change#",  RecId,  "PIR#.",  1,  "+",  $(Status == "Completed")) >
            0)
          
          

           

          From my point of view this should be fine. :-)

           

          Cheers,

          Florian