1 Reply Latest reply on Nov 5, 2015 3:42 AM by AndrewWard

    One Field Refuses to Obey SetHidden and SetMandatroy in Complex Calulation


      I have a very lengthy calc - full content attached as dwCalcItUa.docx - which is controlling the hidden and mandatory properties for a large number of fields. It appears to be working correctly without any logic flaws and yet one field steadfastly refuses to obey the commands to be sethidden:false and setmandatory:true.


      Anyone able to identify what is going wrong please let me know?

      Any suggestions on simplifying the calc would also be welcomed.


      Below is an extract from the window as displayed in the Self Service Portal (left) and the design window from the console (right).

      The field that should be visible mandatory is titled Core Responsibilities mapping to business object LGSSITEbizCoreResp. The window field and object properties have been included for this attribute and the immediate preceding one (subject to the same calc conditions).



      I don't believe there is a logic problem in the calculation because the rogue field is one of 11 fields that exist in the same two code blocks below these conditions


      • If the CI title is “New Permanent Employee” or “New Temporary Employee”
        • And LGSSITEBizReqd is true
        • And LGSSITEbizCoreReqd is true



      • If the CI title is “Update Employee”
        • And LGSSITEBizReqd is true
        • And LGSSITEbizCoreReqd is true


      The misbehaving field is declared in the code sandwiched between two fields which are behaving correctly which are titled "Property module required" and "Budget Holder Role".

      if Request._LGSSITEbizCoreReqd != null and Request._LGSSITEbizCoreReqd == true:

      Value = Value.Replace(" 53H","false")

      Value = Value.Replace(" 53M","true")

      Value = Value.Replace(" 56H","false")

      Value = Value.Replace(" 56M","true")

      Value = Value.Replace(" 57H","false")

      Value = Value.Replace(" 57M","true")

      Value = Value.Replace(" 58H","false")

      Value = Value.Replace(" 58M","true")

      Value = Value.Replace(" 59H","false")

      Value = Value.Replace(" 59M","true")

      Value = Value.Replace(" 60H","false")

      Value = Value.Replace(" 60M","true")

      Value = Value.Replace(" 61H","false")

      Value = Value.Replace(" 61M","true")

      Value = Value.Replace(" 62H","false")

      Value = Value.Replace(" 62M","true")

      Value = Value.Replace(" 63H","false")

      Value = Value.Replace(" 63M","true")

      Value = Value.Replace(" 64H","false")

      Value = Value.Replace(" 64M","true")

      Value = Value.Replace(" 66H","false")

      Value = Value.Replace(" 66M","true")


      Also I displayed the calculation result string on the window which has been attached as dwCalcResultString.docx - note that line feeds have been added before :SetHidden to make it more readable. Below is an extract of the raw result string which contains the field in question and the fields before and after




      All of these fields except the CoreResp field are showing and are mandatory thus obeying the commands returned.