How to use carriage return in formcalc

I'm sure the answer to this question is simple, but being new to formcalc (and scripting in general) I am having problems with it.
The details:
I have a dynamic form in livecycle. The two fields I am having problems with currently are a drop down list, and a text box (not field) associated with it. What is listed in the text box is dependant upon the choice from the dropdown list. So far everything is, functionally, working. I have the formcalc scripting event set to change on the dropdown list with the following script
if (xfa.event.newText == "Office 1") then
     OfficeAddress1 = "123 Street Road #xD Town City, US 12121 #xD (111) 555-1414"
endif
"Office 1" being the dropdown selection
OfficeAddress1 being the name of the text field
The fake address being the address, seperated by carriage return symbols (#xD) to indicate where I want it to jump to the next line.
The script is working fine except that the #xD symbols are showing up on the final form. How do I prevent this?
Thanks for you assistance.

Thanks Paul, good advice.
For anyone that would want to do this in formcalc, the embarrassingly simple way of using a carriage return in the script is... hitting the enter button... no syntax required.
Don't bother trying to line it up in the scripting screen (my mistake), that only puts more spaces than is necessary and will mess up the text orientation on the final form. Just hit enter and don't worry if it's not lined up, it will be.

Similar Messages

  • How to remove carriage returns in message mapping

    Hi Experts,
    I am getting carriage returns in one of the source field, i need to remove those carriage returns and i need to pass it to target field, can anyone suggest me how can i achieve this.

    Hello,
    Are you getting only CR or CR+LF (line feed) ?
    In this case - CRLF - you can use content conversion in your sender adapter:
    <recordset_structure>.fieldSeparator = 'nl'
    So in your receiver adapter you can replace any special char by 'nl' again.
    Check these links.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    http://help.sap.com/saphelp_nwpi711/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm
    Regards,
    Diego Estanguini Gabriel

  • Mac - SQLDev 1.5 - Unable to use carriage return/enter in SQL Worksheet

    This morning I brought up SQLDeveloper (1.5). I connected to a database. Started typing in a query and the carriage return (or enter) does not work. If I go to a menu or the list of files, it does work. Just not in the SQL Worksheet. I removed the application and re-installed. Still the same. I do not see this behavior in any other application or situation. Just within the SQL Worksheet of SQLDeveloper.
    As a check, I did exit all other applications, rebooted, and tried again. Still no joy. I have the latest updates of Leopard and SQLDeveloper. I am guessing it is not using the latest Java but rather what was deployed with SQLDeveloper.
    Any thoughts on how I could lose these two keys? There is no change to the system preferences for the keyboard. There is no setup to have the carriage return or enter key be mapped to anything else.
    Very odd. I tried looking around the application and only in the SQL Worksheet does it not work.
    Any ideas?
    Eric

    Ahh, I was pulling my hair out over this since last week (on a PC, not a Mac). I just couldn't figure out why I could no longer add a line feed on the SQL worksheet when I hadn't changed anything at all.
    Anyway, I still have no idea how the settings got changed, but resetting to defaults did the trick. Thanks!

  • How to add carriage returns

    Greetings all
    I often download lyrics to songs and often they copy into MS Word without hard carriage returns-so they look as one huge paragraph.
    I think the solution is that I must first find out what escape characters are in there, then search and replace with maybe 0A, 0D hex, or something like this.
    Can you tell me first, how to view the actual characters in Terminal or any other program, then how to search and replace.
    can this be done in Text Edit, or Ms Word?
    Thanks much.

    Check out the thread at
    http://hints.macworld.com/article.php?story=20031018164326986
    Or: from http://sed.sourceforge.net/sed1line.txt :
    Using the Unix stream editor sed (type man sed in Terminal for usage):
    # IN UNIX ENVIRONMENT: convert DOS newlines (CR/LF) to Unix format.
    sed 's/.$//' # assumes that all lines end with CR/LF
    sed 's/^M$//' # in bash/tcsh, press Ctrl-V then Ctrl-M
    sed 's/\x0D$//' # works on ssed, gsed 3.02.80 or higher
    # IN UNIX ENVIRONMENT: convert Unix newlines (LF) to DOS format.
    sed "s/$/`echo -e \\\r`/" # command line under ksh
    sed 's/$'"/`echo \\\r`/" # command line under bash
    sed "s/$/`echo \\\r`/" # command line under zsh
    sed 's/$/\r/' # gsed 3.02.80 or higher
    # IN DOS ENVIRONMENT: convert Unix newlines (LF) to DOS format.
    sed "s/$//" # method 1
    sed -n p # method 2
    # IN DOS ENVIRONMENT: convert DOS newlines (CR/LF) to Unix format.
    # Can only be done with UnxUtils sed, version 4.0.7 or higher. The
    # UnxUtils version can be identified by the custom "--text" switch
    # which appears when you use the "--help" switch. Otherwise, changing
    # DOS newlines to Unix newlines cannot be done with sed in a DOS
    # environment. Use "tr" instead.
    sed "s/\r//" infile >outfile # UnxUtils sed v4.0.7 or higher
    tr -d \r <infile >outfile # GNU tr version 1.22 or higher

  • How to handle carriage return/linefeed embedded in text field as first char

    Hi,
    I am trying to use sqlldr to import text that is comma-separated and double quote-enclosed, but contains embedded carriage return/linefeed pairs. I have a control file which works for most cases and looks like this:
    LOAD DATA
    INFILE './foo.new'
    APPEND
    CONTINUEIF LAST PRESERVE (<>'"')
    INTO TABLE <tablename>
    FIELDS TERMINATED BY "," ENCLOSED BY '"'
    TRAILING NULLCOLS
    Unfortunately, this fails when the very first character of the text field is a carriage return/linefeed pair, e.g.,:
    "11","22","33","\r\nThis is the fourth field","","","","",""
    In that case, what is actually the opening double-quote for the fourth field, is interpreted by the CONTINUEIF clause as the end of that line. Can anyone please point me to a solution?
    thanks.
    stan.

    Thanks for the suggestion. Unfortunately, I've already tried it, and it doesn't help. I believe the problem is that sqlldr tries to figure out where each record is delimited before it parses out the field. So, any field-level trimming depends on sqlldr first determining that the cr/lf is actually part of that record, and not an indication of the start of a new record (and it's doing the latter right now). Fwiw, Python's csv parser will handle this type of record just fine.
    regards.
    stan.

  • How to capture carriage return in SAP Business One?

    Hi guys,
    I am using C# for developing a plug-in for SAP business one 2005, I tried to use '\n' to capture carriage return in some fields that are stored in SQL server 2005, but it didn't work. I tried the same code in a C# windows application and it worked. I just want to know that if the carriage return in SAP has a special sequence code for that or not.
    The code I tried is "
    string s = "something";
    if (s.contains('\n'))
       //do something;
    Thanks  a lot

    Hi,
    I guess you did a typo: Chr(9) is TAB... I think you meant Chr(10).
    Regards,
    Eric

  • How to retain carriage return and spaces in a report..

    Hi everyone,
    I have a TEXT AREA where users enter comments in that like
    First record
    Hi           Carriage returns          spaces
    Second  record
    Hi
    carriage returns
    spaces
    Third record
    Hi
         carriage returns
                                 spaces
    Is it possible to retain the carriage returns and spaces when i am displaying the records in a report.
    For carriage returns i replaced  chr(10) with '
    (without the single quotes). I works fine. But how i can i retain the spacesplease give me some suggestions
    Thanks
    phani

    Hi dimitri,
    Thanks for the reply
    For carriage returns i am doing like this replace(column_name,chr(10),'<"br">') (Ignore the double quotes)
    For spaces is there any ASCII code like chr(10) for carriage returns..
    I mean how to identify Number of spaces in database..
    Thanks
    phani
    Message was edited by:
    phani marella

  • How to use Essbase @RETURN function to displayed messages in 11.1.2.1

    Hi,
    I found Business Rule support Essbase @RETURN function in Hyperion Planning 11.1.2.1 new feature.
    If I create a simple BR for planning app as below:
    "@RETURN("test return message" , WARNING);"
    The validation returns error and BR can not be deployed.
    Does any one how to use @RETURN function in BR?
    Thanks!

    Hi,
    From Essbase Technical Reference Guide: http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?launch.html
    Example+
    The following example stops the calculation and returns a custom warning message if maximum values specified in the IF statement are empty:+
    FIX("Actual")
    . "Profit"(
    IF( ("Marketing" < 0) OR ("Payroll" < 0) OR ("Misc" < 0) )
    @RETURN( @CONCATENATE(
    @CONCATENATE("The violation of data integrity : Market [", @NAME(@CURRMBR("Market"))),
    "] has a negative expenses. Calculations are interrupted")
    , WARNING);
    ELSE
    "Profit" = ("Margin" - "Total Expenses")*0.9;
    ENDIF
    ENDFIX
    Cheers,
    Alp

  • How to supress carriage return in File?

    Hi
    I am getting a file which is very large. When i am processing the large file, file adapter is picking but i dont see any message in SXMB_MONI. Each record in my file should be in same line, But some of the fields like "address2" in the records have carriage return so when ever this address2 has data this record splits into two lines.
    Ex:
    Name, ID, Address1, Address2, City, State, Country..
    Name, ID, Address1, Address2, City, State, Country..
    Name, ID, Address1, Address2, City, State, Country..
    Name, ID, Address1,Address2,
    City, Country....* like this....
    think because of this my file is not processing. Because I checked individually this type of records I am getting the errors.
    But if i am processing as whole file XI is picking up but its not showing anything in SXMB_MONI.
    How to remove the carriage return if i get the records like this.
    Thanks & Regards
    Sowmya...

    Hi,
    Even if you have any errors in the file data, it should not stop XI from picking up the file. In this case, the file should be processed and you should find errors in SXMB_MONI. When you said compressed what did you do? Did you make a shorter file out of the large one? In that case, check if the file name and directory are exactly configured (case sensitive). Check the adapter monitoring if you find any red light.
    Coming to the data problem, unless you file end character is different from carriage return, I do not think XI would be able to parse the file properly. You might want to request you file generating application to suppress the carriage return in any of the data fields or at least the record delimiter.
    VJ

  • How to undo carriage returns?

    Hi, I send char(10) and char(13) to my output stream to move to the next line. If the user presses the backspace, char(8), I have to undo what he has typed. Undoing characters is not a problem as long as the user has not moved to the next line (no carriage return was sent to output stream).
    I would like my cursor to move back to previous line if user does backspace and current line has no more characters. Anyone knows how?
    Btw, sending char(8) to the outputstream did not do the trick, it only did so for charaters.
    Thanks.

    Well, it's still not working today (after 20 years). The application is on a DOS environment. Would like to undo previous line when user continuously presses backspace.

  • How to use interface return value in workflow task

    Hi all,
    My team developed a proxy(interface) to fetch a field from web application(Non SAP) through PI. i tested that interface in SAP, its working fine. Interface is having one input, one output.
    Input - from SAP(employee number)
    Output - from webapplication (manager number).
    In my workflow, i have to use that manager number in decission task. For that i created a task, but in that task, iam unable to use the class and method name which is mentioned above. its giving an error "Interface implementation IF_WORKFLOW does not exist".
    Please guide me, how to use that interface output in my workflow.
    Regards
    Arani Bhaskar

    "Interface implementation IF_WORKFLOW does not exist".
    This error is triggered because the class which you are using in the task does not have included and implemented the interface IF_WORKFLOW , if at all you want to use any class methods in the workflow, then that class must supprot the interface IF_WORKFLOW
    what you can do is 
    1. Include the interface IF_WORKFLOW in the class that you are using to fetch the manager number,
    2. Make the method as Static Method .
    3. Just implement all the methods , I mean just double click each method of the interface, clcik on pretty printer and save it, to just implement all the methods.
    3. Do the appropriate bindings .
    And finally just execute the txn SWU_OBUF and click Shift+F1.
    this will help you to retrive the manager number intot the workflow

  • textarea text lost in ITS when using carriage return

    If the user hits carriage return in a <textarea>, i.e. to create a new line of text, everything after the carriage return is ignored by R/3 when retrieving the text.
    Is there a way to avoid this loss of text.
    Thanks
    Karen

    Try with this.
    On the html:
    <textarea name="ztdline1[]" cols="100" rows="3">`if (ztdline1.dim > 0)` `repeat with r from 1 to 3; if ( ztdline1[r] != "*" ) ;write (strSub (ztdline1[r], 3, 132), "\r\n"); end; end` `end`</textarea>
    On the PBO dynpro:
      loop at ztdline1 cursor top_line.
      endloop.
    On the PAI dynpro:
      module get_text1.
      loop.
      endloop.
    where module get_text1 is:
      clear ztdline1.
      refresh ztdline1.
      do.
        field-get 'ZTDLINE1' sy-index message_line datalen.
        if sy-subrc <> 0.
          exit.
        endif.
        read table message_line index 1.
        if sy-subrc eq 0.
          ztdline1-tdline = message_line.
          append ztdline1.
        else.
          clear ztdline1-tdline.
          append ztdline1.
        endif.
      enddo.

  • How to Add Carriage Return After PageBreak using XSL code?

    Hi,
    I have created one RTF Template for Check printing. My requirement is to print check on next page if total number of invoices exceeds certain value.
    I achieved this and used below condition in my RTF Template.
    <xsl:if xdofo:ctx="inblock" test="count($invLines)>=$lpp"><xsl:attribute name="break-after">page</xsl:attribute></xsl:if>
    "lpp" is global variable whose value is set at the start of template. Now i also want to add some space after pagebreak in my Template.
    Like presently, check prints at the top of page, so i want to print it after leaving 9-10 lines blank.
    Can anyone please help me to achieve this?
    Thanks
    Amit

    Hi,
    I tried below syntax but its working only for first page, its not giving space for second page
    <xsl:if xdofo:ctx="inblock" test="count($invLines)>$lpp"><xsl:attribute name='space-after'>700pt</xsl:attribute></xsl:if>
    I want to combine it with page-break. Like i need specific space only after page break. I tried to combine both, but its not working. Any inputs on these?
    <xsl:if xdofo:ctx="inblock" test="count($invLines)>$lpp"><xsl:attribute name='space-after'>100pt</xsl:attribute>
    <xsl:attribute name="break-after">page</xsl:attribute></xsl:if>
    Thanks
    Amit
    Edited by: user11982820 on Apr 14, 2010 5:52 AM

  • How to use value returned from a bean in jsp page

    Hi All,
    I have a string array value being returned from a javabean to a jsp page. I want to be able to assign the value to a variable in the jsp page.
    How do I do this?
    Many thanks :)

    thanks for your response.
    I actually used something like this:
    <% String loggedin = log.User(user,password);
    out.println(loggedin);
    %>i am not yet as much of an expert on beans as i would like to be, but i thought it is not really a bean if it has a getter method which takes arguments?

  • Over partition: how to use to return the max of two columns

    For each unique id, I want to select the value of col2 in the record with the most recent date.
    When the rows with the same IDs have the same dates, I want the max value from col2.
    I want one row for each ID, but I'm getting two rows for ID 3333333.
    with data as
    select 1111111 as id, 'a' as col2, to_date('01-JAN-09','dd-mon-yyyy') as the_date from dual union all
    select 2222222 as id, 'b' as col2, to_date('02-JAN-09','dd-mon-yyyy') as the_date from dual union all
    select 2222222 as id, 'c' as col2, to_date('03-JAN-09','dd-mon-yyyy') as the_date from dual union all
    select 2222222 as id, 'd' as col2, to_date('04-JAN-09','dd-mon-yyyy') as the_date from dual union all
    select 3333333 as id, 'e' as col2, to_date('05-JAN-09','dd-mon-yyyy') as the_date from dual union all
    select 3333333 as id, 'f' as col2, to_date('05-JAN-09','dd-mon-yyyy') as the_date from dual
    select id, col2, the_date
    from
    select id, the_date, col2, max(the_date) over (partition by id) as max_the_date, max(col2) over (partition by col2) as max_col2
    from data
    where the_date = max_the_date and col2 = max_col2 order by id
    Expecting this:
    ID     COL2     THE_DATE
    1111111     a     1/1/0009
    2222222     d     1/4/0009
    3333333     f     1/5/0009
    but I'm getting 2 rows for ID 3333333
    Any suggestions?

    TRy this code without subquery
    SELECT   ID, MAX (the_date)KEEP (DENSE_RANK LAST ORDER BY the_date),
             MAX (col2)KEEP (DENSE_RANK LAST ORDER BY the_date)
        FROM DATA
    GROUP BY ID
    ORDER BY ID
    SQL> WITH DATA AS
      2       (SELECT 1111111 AS ID, 'a' AS col2,
      3               TO_DATE ('01-01-2009', 'dd-mm-yyyy') AS the_date
      4          FROM DUAL
      5        UNION ALL
      6        SELECT 2222222 AS ID, 'b' AS col2,
      7               TO_DATE ('02-01-2009', 'dd-mm-yyyy') AS the_date
      8          FROM DUAL
      9        UNION ALL
    10        SELECT 2222222 AS ID, 'c' AS col2,
    11               TO_DATE ('03-01-2009', 'dd-mm-yyyy') AS the_date
    12          FROM DUAL
    13        UNION ALL
    14        SELECT 2222222 AS ID, 'd' AS col2,
    15               TO_DATE ('04-01-2009', 'dd-mm-yyyy') AS the_date
    16          FROM DUAL
    17        UNION ALL
    18        SELECT 3333333 AS ID, 'e' AS col2,
    19               TO_DATE ('05-01-2009', 'dd-mm-yyyy') AS the_date
    20          FROM DUAL
    21        UNION ALL
    22        SELECT 3333333 AS ID, 'f' AS col2,
    23               TO_DATE ('05-01-2009', 'dd-mm-yyyy') AS the_date
    24          FROM DUAL)
    25  SELECT   ID, MAX (the_date)KEEP (DENSE_RANK LAST ORDER BY the_date ),
    26           MAX (col2)KEEP (DENSE_RANK LAST ORDER BY the_date )
    27      FROM DATA
    28      group by id
    29  ORDER BY ID;
            ID MAX(THE_DA M
       1111111 2009-01-01 a
       2222222 2009-01-04 d
       3333333 2009-01-05 f
    SQL> Edited by: Salim Chelabi on 2009-03-05 11:49
    Edited by: Salim Chelabi on 2009-03-05 11:50

Maybe you are looking for