3 Replies Latest reply on Jun 15, 2015 9:51 AM by Darren.Bradshaw

    Dynamic form calculations

    neil_p1000 Apprentice

      Hi All

       

      Im trying to create a triage system in the Call Management module but I am struggling to get a calculation to for a dynamic window to allow certain attribute to display when I select a criteria.

       

      Basically I want to have Incident Categories and Service Catalogue attribute hidden until I select a Call Type Attribute of Incident or Request

       

      Is this possible and if so how could I do it.

       

      I have all the necessary Attributes on the call window form the Incident Node and Request Node I just need the dynamic window calculation

       

      Hope this makes Sense 

        • 1. Re: Dynamic form calculations
          Darren.Bradshaw Specialist

          Yeah it is possible however if your are displaying a category list from incident or request then you wont be able to set a mandatory depth for that category.

           

          We did something similar here is our call triage calculation, I have highlighted the category parts.  But you will need to create a relationship between incident category and call, and request category and call:

           

           

          import System

           

          static def GetAttributeValue(Call):

           

          Value = ''

           

          HideCustPhone = true

           

          HideContactNo = false

           

          HideSLA = true

           

          HideSoftware = true

           

          HideAsset = true

           

          HideDisableAsset = true

           

          HideSerial = true

           

          HideIMCat = true

           

          HideRMCat = true

           

          HideCustRes = true

           

            

           

          ManContactNo = true

           

          ManIMCat = false

           

          ManRMCat = false

           

          ManCustRes = false

           

          ManAsset = false

           

          ManSLA = false

           

           

           

          //Is it a School?

           

          if Call.Customer != null and Call.Customer.SupportGroup != null and Call.Customer.SupportGroup.Title == 'Schools Account Management':

           

          HideCustPhone = false

           

          HideContactNo = true

           

          HideSLA = false

           

          ManContactNo = false

           

          ManSLA = true

           

          if Call._QuickCallTemplates != null and Call._QuickCallTemplates._QuickClose == false:

           

          HideSerial = false

           

           

           

          //Is it a BSF School?

           

          if Call.Customer != null and Call.Customer.SupportGroup != null and Call.Customer.SupportGroup.Title == 'BSF Account Management':

           

          HideSLA = false

           

          ManSLA = true

           

            

           

          //Is it a External Customer?

           

          if Call.Customer != null and Call.Customer.SupportGroup != null and Call.Customer.SupportGroup.Title == 'External Account Management':

           

          HideSLA = false

           

          ManSLA = true

           

          //Not a School

           

          if Call.Customer != null and Call.Customer.SupportGroup != null and Call.Customer.SupportGroup.Title != 'Schools Account Management':

           

          HideAsset = false

           

          HideDisableAsset = false

           

          if Call.Customer != null and Call.Customer.SupportGroup != null and Call.Customer.SupportGroup.Title != 'BSF Account Management':

           

          ManAsset = true

           

          //Incident

           

          if Call._QuickCallTemplates != null and Call._QuickCallTemplates._QuickClose == false and Call._QuickCallTemplates._ProcessType == 0:

           

          HideIMCat = false

           

          ManIMCat = true

           

            

           

            

           

          if Call._IMCategory != null and Call._IMCategory.FullName.Contains('Software'):

           

          HideSoftware = false

           

          //Request

           

          if Call._QuickCallTemplates != null and Call._QuickCallTemplates._QuickClose == false and Call._QuickCallTemplates._ProcessType == 1:

           

          HideRMCat = false

           

          ManRMCat = true

           

           

           

          if Call._QuickCallTemplates != null and Call._QuickCallTemplates._ResolutionRequired == true and Call._QuickCallTemplates._QuickClose == true:

           

          HideCustRes = false

           

          ManCustRes = true

           

          if Call._QuickCallTemplates != null and Call._QuickCallTemplates._QuickClose == true:

           

          HideAsset = true

           

           

           

          //Portal Call?

           

          if Call._Source != null and Call._Source._Source == 'Portal':

           

          HideSerial = false

           

            

           

            

           

          Value = Value + ':SetHidden(Customer.Phone,' + HideCustPhone + ');'

           

          Value = Value + ':SetHidden(_ContactNo,' + HideContactNo + ');'

           

          Value = Value + ':SetHidden(ConfigurationItem,' + HideSLA + ');'

           

          Value = Value + ':SetHidden(_IMCategory,' + HideIMCat + ');'

           

          Value = Value + ':SetHidden(_Software,' + HideSoftware + ');'

           

          Value = Value + ':SetHidden(_AssetNumber,' + HideAsset + ');'

           

          Value = Value + ':SetHidden(_RMCategory,' + HideRMCat + ');'

           

          Value = Value + ':SetHidden(_CustomerResolution,' + HideCustRes + ');'

           

          Value = Value + ':SetHidden(_SerialNumber,' + HideSerial + ');'

           

          Value = Value + ':SetHidden(_DisableAssetFilter,' + HideDisableAsset + ');'

           

           

           

          Value = Value + ':SetMandatory(_CustomerResolution,' + ManCustRes + ');'

           

          Value = Value + ':SetMandatory(_IMCategory,' + ManIMCat + ');'

           

          Value = Value + ':SetMandatory(_RMCategory,' + ManRMCat + ');'

           

          Value = Value + ':SetMandatory(_AssetNumber,' + ManAsset + ');'

           

          Value = Value + ':SetMandatory(ConfigurationItem,' + ManSLA + ');'

           

          Value = Value + ':SetMandatory(_ContactNo,' + ManContactNo + ');'

           

          return Value

           

          • 2. Re: Dynamic form calculations
            neil_p1000 Apprentice

            Cheers Darren this helped greatly and I managed to get part of the dynamic window to work. The below calculation means when I Select Call Type to be Incident the Incident urgency and Process Category and Impact fields appear and are set to mandatory, but I have tried numerous alterations to get Catalogue Hierachy and Config Item Requested to appear if you select Request for the call type.  Any Ideas how I could put this into the below calculation would be appreciated

             

            import System

            static def GetAttributeValue(Call):

            Hide_CallType1 = true

            Mandatory_CallType1 = false

            if Call._CallType1 !=null and Call._CallType1._CallType == 'Incident':

              Hide_CallType1 = false

              Mandatory_CallType1 = true

            return String.Format(":SetHidden(_ProcessCategory1,{0});:SetHidden(_Impact,{1});:SetHidden(_IncidentUrgency,{2});:SetMandatory(_ProcessCategory1,{3});:SetMandatory(_Impact,{4});:SetMandatory(_IncidentUrgency,{5})", Hide_CallType1, Hide_CallType1, Hide_CallType1, Mandatory_CallType1, Mandatory_CallType1, Mandatory_CallType1)

            • 3. Re: Dynamic form calculations
              Darren.Bradshaw Specialist

              Hi Neil,

               

              Try this:

               

              import System

              static def GetAttributeValue(Call):

                Hide_CallType1 = true

                Mandatory_CallType1 = false

                Hide_CallType2 = true

                Mandatory_CallType2 = false

               

                if Call._CallType1 !=null and Call._CallType1._CallType == 'Incident':

                Hide_CallType1 = false

                Mandatory_CallType1 = true

                if Call._CallType1 !=null and Call._CallType1._CallType == 'Request':

                Hide_CallType2 = false

                Mandatory_CallType2 = true

               

               

                return String.Format(":SetHidden(_ProcessCategory1,{0});:SetHidden(_Impact,{1});:SetHidden(_IncidentUrgency,{2});:SetMandatory(_ProcessCategory1,{3});:SetMandatory(_Impact,{4});:SetMandatory(_IncidentUrgency,{5})", :SetHidden(_CatalogueHierachy,{6});:SetHidden(_ConfigfigItem,{7});:SetMandatory(_CatalogueHierachy,{6});:SetMandatory(_ConfigfigItem,{8})", Hide_CallType1,Hide_CallType1, Hide_CallType1, Mandatory_CallType1, Mandatory_CallType1, Mandatory_CallType1, Hide_CallType2, Hide_CallType2,Mandatory_CallType2, Mandatory_CallType2)