4 Replies Latest reply on Nov 10, 2014 10:53 AM by Francisco Amores

    Invert sign on import with script

    user1659263

      Dear Guruz,

       

      Both FDMEE 11.1.2.3 and new scripting language Jython are beautiful.

       

      Now please help me please with the following :

       

      This script works fine :

      def separation(strfield,strrec):
          if strfield == 0:
              return strrec.split(";")[8]
          else:
              x = strfield
              return x
      

       

      This script, where I want to invert x value, does not work fine! Why and how to handle this issue?

      def separation(strfield,strrec):
          if strfield == 0:
              return strrec.split(";")[8]
          else:
              x = strfield * -1
              return x
      

       

      Many thanks.