Workflow Soluiton

 View Only
Expand all | Collapse all

maintain Formatting

  • 1.  maintain Formatting

    Posted Oct 30, 2012 08:37 AM

    Hi

    Has anyone been able to write a file and maintain the formatting ?

    I have a form that users fill in and using a merge html - HTML to text - create text file - write file.  all i get in the file output is a string with no formatting?

    I only need three carraige returns in the start of the string to accomplish my goal , does anyone know a way of acheiving this?

     

    Regards  C



  • 2.  RE: maintain Formatting

    Posted Oct 30, 2012 11:40 AM

    The only way I've ever been able to get this to work is to use the append text file component to add each new line I need. So it would be somemthing like create text file > write file > append file > write file > append file > write file.



  • 3.  RE: maintain Formatting

    Posted Nov 01, 2012 06:57 AM

    Hi Thanks

    I've cobbled together a flow similar to what you describe but...

    keep getting "cannot find temp file path".

    C



  • 4.  RE: maintain Formatting

    Posted Nov 01, 2012 07:42 AM

    I'd see if there's a system variable for TEMP defined on your system.



  • 5.  RE: maintain Formatting

    Posted Nov 01, 2012 10:19 AM

    Hi Reecardo

    Thanks for the reply

    There is a sytem variable defined for TEMP

    it seems to fall over when I "append to text file" with an error "illegal characters in path", I'm adding the append text as a constant.

     

    C



  • 6.  RE: maintain Formatting

    Posted Nov 01, 2012 10:42 AM

    My model looks correct but I get this error

    Could not find file 'C:\Program Files\Symantec\Workflow\Designer\bin\tmpD63F.tmp'."

    Here is my flow

     



  • 7.  RE: maintain Formatting

    Posted Nov 01, 2012 10:52 AM

    So is your second create text file something different than what you're appending the text to is the component before it? If not, you can bypass that and go directly to your write file component. Also, I'm writing my file to a full path location so that may be why I'm not getting any conflicts. I just have a temp directory on my workflow server that create and delete a bunch of temp batch/ps1 files and what not. My model looks like this..

     



  • 8.  RE: maintain Formatting

    Posted Nov 01, 2012 11:23 AM

    Hi Thanks for sharing your flow , although what are the components not shown on the right after the "append to text" etc ?

    I've modified it again and get this in the debug log

    EndDate = 01/11/2012 15:19:49
    ErrorMessage = "Illegal characters in path."
    Forename = "e"
    GATEWAY_INTERFACE = ""
    HTTP_ACCEPT = "text/html, application/xhtml+xml, */*"
    HTTP_ACCEPT_ENCODING = "gzip, deflate"
    HTTP_ACCEPT_LANGUAGE = "en-GB"
    HTTP_CONNECTION = "Keep-Alive"
    HTTP_HOST = "localhost:7781"
    HTTP_USER_AGENT = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
    HTTPS = ""
    HTTPS_KEYSIZE = ""
    HTTPS_SECRETKEYSIZE = ""
    HTTPS_SERVER_ISSUER = ""
    HTTPS_SERVER_SUBJECT = ""
    INSTANCE_ID = ""
    INSTANCE_META_PATH = ""
    LastComponent = "Append Line To Text File"

     

    Illegal characters in path ?  only letters in the path for the append

     

    C



  • 9.  RE: maintain Formatting
    Best Answer

    Posted Nov 01, 2012 11:40 AM
      |   view attached

    Whoops sorry I'm not sure why it cut it off, you can right click and do open in new tab/window and it should show the whole picture.

     

    Strange that you're getting that error still, can you simplify it just a bit to isolate the issue. I've included a simple package that that should test the functionality. Just change the .doc to .package and you should be able to open it from your server.

     

     

    Attachment(s)

    doc
    test3.doc   1.31 MB 1 version


  • 10.  RE: maintain Formatting

    Posted Nov 01, 2012 11:41 AM

    Why is this needed to keep formatting in a text file?

    Just seems overly complex

     

    C



  • 11.  RE: maintain Formatting

    Posted Nov 01, 2012 11:42 AM

    Thanks I'll give it a try and let you know

     

    C



  • 12.  RE: maintain Formatting

    Posted Nov 01, 2012 12:14 PM

    Awesome!!!   Thanks that works smiley

    the app that I'm sending the file to doesn't allow a string so I have to format the header of the text file exactly.

    Which is why i need to do this ....but what a lot of effort???   just for this

     

    Thanks  C



  • 13.  RE: maintain Formatting

    Posted Nov 01, 2012 01:00 PM

    Yeah it's certainly a headache especially when you have multiple lines but I guess as long as it works.. haha.