FileAccess Node with Carriage Return or New Line

 4 Replies
 1 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Roger French
Veteran Member
Posts: 549
Veteran Member
    Hello,
    I'm writing a simple flow to query RM and then write out the results in a file on the PC. I have the RM query node, and inside of that, I have the FileAccess Node. Within the file access node, I want to append a new line everytime it writes to the file. 

    However, in testing it, it just appends the data into one very long string, and does not parse it out into new lines.

    How can I pass a new line or carriage return in the File Access node? I've tried a few things but they don't work. Or is there another way to do this?

    Thanks in advance,
    -R
    John Henley
    Posts: 3353
      Couple of ways you can try:
      - just insert the newline/carriage return in the input box for the file access node
      - create a variable var1, and assign var1 = \r\n then put the variable into the input box

      Thanks for using the LawsonGuru.com forums!
      John
      Lynne
      Veteran Member
      Posts: 122
      Veteran Member
        You can define a string variable set to "\n". Then, append this variable onto the end of your data string that you are writing out in the file access node.
        BarbR
        Veteran Member
        Posts: 306
        Veteran Member
          I do it the easy way
          In my File Access node, File Operation Append to File, in the Input Data box after I've included the fields I want to append, I simply press the enter key so that the cursor goes to the next line. Works like a charm!
          Roger French
          Veteran Member
          Posts: 549
          Veteran Member
            Thanks Barb,
            That worked perfectly. Great job! Thanks for the advice.
            Roger