Automic Workload Automation

  • 1.  Static VARA entry with multiple Lines

    Posted Sep 26, 2018 08:17 AM

    Hello there,

     

    i have a Prompt-Objekt which asks me to input some Text:

    I can read this "E-Mail Text" [&PRPT_TEXT#] in my Script and send it via [SEND_MAIL]

     

    Script and Report:

     

    E-Mail Result:

     

    PERFEKT

     

    BUT

    I dont want to use [SEND_MAIL] because i have to use an CALL-Objekt.

    I have some tables and text with HTML colorations depending on this and that ... etc.....

     

    So - i need to type HTML Code between every "LINE"

     

    When i check the Report again - i see that all my "LINE"

    Zeile1

    Zeile2

    ...

    are just ONE Value for Automic:

     

    I tried to seperate / replace each "LINE" with something like this:

     

    Or this

     

    I even tried to [PUT_VAR] the "&PRPT_TEXT#" and "GET_VAR" /read\ it out from the VARA to see if i would have seperate "LINEs".

    But even then - it is just one Value.

     

    What i need is something like this - no - i indeed need this

     

    <br>

    Zeile1<br>

    Zeile2<br>

    Zeile3<br>

    Zeile4<br>

    Zeile5<br>

     

    Just that i mentioned it - ill be more creative with the HTML Code - at least.

    Now i just need to be able to seperate my entries from the VARA /or\ PROMPT.

     

    PS: to type it all in a Text-file and then read the Text-file would work.... or to do a seperate Job which i could Post-Script the Report .... but .... well, this cannot be the way     i hope so.

     

    I thank you for your help



  • 2.  Re: Static VARA entry with multiple Lines

    Posted Sep 26, 2018 09:42 AM

    Hi @Thomas_Hartmann

     

    Please have a look at this post, I think it could help in your case :

    How to display VARA output in a table in a CALL (email) object 

     

    Best regards,

    Antoine



  • 3.  Re: Static VARA entry with multiple Lines
    Best Answer

    Posted Sep 26, 2018 10:26 AM

    I ran into into this earlier this year. The solution is to define an object variable containing a single newline character. It seems that newlines in multi-line object/prompt set variables are different from newlines set using UC_CRLF().

     

     

    Then the substitution will work correctly.

     

    Script:

    :PRINT "String 1 Before : &String1#"
    :SET &String1_new# = STR_SUB(&String1#,&NewLine#,"<br/>")
    :PRINT "String 1 After  : &String1_new#"

     

    Output:

    2018-09-26 16:19:08 - U00020408 String 1 Before : Line1
    Line2
    Line3
    Line4
    Line5
    2018-09-26 16:19:08 - U00020408 String 1 After  : Line1<br/>Line2<br/>Line3<br/>Line4<br/>Line5

     

    #aescripting



  • 4.  Re: Static VARA entry with multiple Lines

    Posted Sep 26, 2018 12:11 PM

    Ingenious solution!

    I thought about how to figure out in „what“ exactly that UC_CRLF is „marked“. 

    Your Idea doesnt answer that BUT perfectly uses the same /New_Line\. 

    This is Great! Thank you for rescuing me writing txt Files etc... 



  • 5.  Re: Static VARA entry with multiple Lines

    Posted Sep 26, 2018 10:36 AM

    You may also be interested in this idea:

    Allow multi-line content in :READ buffers 



  • 6.  Re: Static VARA entry with multiple Lines

    Posted Sep 27, 2018 03:33 AM

    I voted for that!
    Multi-Line Content shouldn´t be problem at all!