We recommend switching to the latest versions of Edge, Firefox, Chrome or Safari. Using Internet Explorer will result in a loss of website functionality.

Get record column1 that is not Null and output in Column2



  • Avatar
    Adrian Williams

    You could use the following code in a Transform node (it assumes your input field and output field are both string data types as per your screenshot and defaults to using 1st January 1900 if the first record has a Null value):


    #### ConfigureFields property script

    out1 += in1
    out1.test = str


    #### ProcessRecords property script

    if node.firstExec:
      previousValue = '1900-01-01'

    if fields.Column1 is not Null:
      out1.test = fields.Column1
      previousValue = fields.Column1
      out1.test = previousValue


    Comment actions Permalink
  • Avatar

    Hi Adrian, 

    thanks, I had already seen the firstExec node but could not get it to work (could not find enough information and the online documentation gives a timeout). 

    Thanks again
    Comment actions Permalink
  • Avatar
    Adrian Williams

    Hi Dino,

    The second sample code snippet in the ProcessRecords script of the Transform node includes an example of using the node.Exec() method.

    I believe there was an issue with the link to the online version of the help for a short while that has been resolved. The online help documentation is for the server also covers the Python scripting topics and is available here.



    Comment actions Permalink

Please sign in to leave a comment.