1 Reply Latest reply on Feb 18, 2016 4:23 AM by Profane

    Calculation - return no value....

    Profane Apprentice

      Hi all,

      i made a calculation on a field of ConfigItem but the return value is null

      i log calculation to have more explanation and the result is :

       

      Attribute Calculation Successful at 2016-02-17 17:29:15.601
      Calculation successful for Attribute [_CodeXX] on Class Type [Config._Terminal]
      On Object : Key = [51f40566-d183-4fb6-8b7c-97f70981f2f7]  Name = [Test1]
      Calculated Value = []
      
      

       

      formula is (if a field "affectationogre' change value to '46_T' then my other field become '99999'  value)

      import System
      static def GetAttributeValue(ConfigItem):
      if ConfigItem._affectationogre == '46_T':Value = "99999"
          return Value
      
      

       

      anybody has always meet this issue ?

       

      Regards

        • 1. Re: Calculation - return no value....
          Profane Apprentice

          I ve made some update , i get the qood value (99999)

           

          import System

          static def GetAttributeValue(ConfigItem):

              Value2 ='99999'

              if ConfigItem._affectationogre._Index=='46_T':return Value2

           

          but now i have this errormessage

           

          Calculation

          Attribute Calculation Unsuccessful at 2016-02-18 11:46:18.398

          Calculation successful for Attribute [_CodeXX] on Class Type [Config._Terminal]

          On Object : Key = [87170a50-dd20-4451-8bad-f486eeea968b]  Name = [Test1]

          Calculated Value = [99999]

          FAILED

          Il s'est produit une non-concordance de type lors d'une tentative de définition de la valeur d'un attribut _CodeXX

          Non - matching type when attempting to set the value attribute .....

           

          format field of CodeXX is string , perhaps value2 = '99999' is not the good format of syntax

           

          some help ?

           

          Regards