Cffunction returns space

Hi,
I am using coldfusionmx6 and created function.while it calling in xml it giving space.How to delete space?
<cffunction name="datereplaceformat" returntype="string">
  <cfargument default="" name="datechange" required="No">
   <cfargument default="" name="formatchange" required="No">
<CFSET var SDATE=reREPLACE(datechange,"#formatchange#"," ","all")>
<CFSET var rspace=reREPLACE(SDATE," ","","all")>
<cfreturn rspace>
</cffunction>
sample xml:
<cfoutput>
<va4>
<datepost>#trim(datereplaceformat(variables.NotPostedTransDate,"/"))#</datepost>
</va4>
</cfoutput>
In posting page it showing as
<va4>
<datepost>
10302010
</datepost>
</va4>
Advance Thanks

Adding the output="no" property to the the <cffunction...> tag so that ColdFusion does not include any whitespace from the function may help.
You may also want to consider some of ColdFusion's other whitespace management features.  <cfsilent>...</cfsilent>  <cfsetting enableCFoutputOnly="Yes"> being a couple of the most utilized.

Similar Messages

  • Return space in the case of no row returned

    Hi,
    I have a requirement , if sql query will not return any row in that case I want to display speace
    Please have a look into belwo example.
    select number_column1, number_column2,varchar_columb3 from my_table where column1=values
    In the case of no_row_returned above query should return space
    example
    ' ' number_column1,' ' number_column2,' 'varchar_columb3

    Hi,
    Siddharth Singh wrote:
    Hi,
    I have a requirement , if sql query will not return any row in that case I want to display speace
    Please have a look into belwo example.
    select number_column1, number_column2,varchar_columb3 from my_table where column1=values
    In the case of no_row_returned above query should return space
    example
    ' ' number_column1,' ' number_column2,' 'varchar_columb3An outer join produces results when when nothing is found in a certain table:
    SELECT     m.number_column1
    ,      m.number_column2
    ,     m.varchar_columb3
    ,     ' '     AS space_col     -- If wanted
    FROM             dual
    LEFT OUTER JOIN my_table  m  ON  m.column1  = m.vals     -- VALUES is not a good column name
    ;Whether or not space_col is included, the result set will include 1 row that appears to be empty when no data is actaully taken from my_table.

  • Need to remove carriage returns, spaces, etc.

    Hello,
    I am trying to build a string that is on one line,
    1,2,3,4,5,6,7,8,9
    however, I wind up with each number on a separate line.
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9
    My code looks like this:
    var xxx = "";
    for (var i=1; i<= nNumWords; i++) {
          global.srchVals[i].name = "Payor Mix";
       global.srchVals[i].mode = 0;
       xxx = i;
       if (i < nNumWords) {
       xxx = xxx + ",";
      //xxx = xxx.replace(/\s+/g,"").trim();
      } else {
       xxx = xxx;
       //xxx = xxx.replace(/\s+/g,"").trim();
          var PMItms = [xxx];
       //console.println(xxx);
    I tried using the following line of code to remove carriage returns and spaces:
       xxx = xxx.replace(/\s+/g,"").trim();
    But it keeps on giving me the following error:
    TypeError: xxx.replace(/\s+/g, "").trim is not a function
    Any help is appreciated.
    Thanks
    Linda

    I just want to make sure I'm approaching this problem the correct way.
    I am trying to build a string that is on one line,
    1,2,3,4,5,6,7,8,9
    however, in the debugging console, I wind up with each number on a separate line.
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9
    Will "Trimming" the string correct the issue?
    Thanks
    Linda

  • Oracle does return space to OS

    Dear Friends,
    Pls help me with the following situation.
    I have deleted an unwanted table which is having about 1.5GB of data from my oracle 8i production server, because I want some space in my solaris server.
    After deleting the rows in the table, using user_extents I found the space is only 80 MB, but my solaris box is still showing the same % of free space.
    I first truncated the table and then copied back only the required rows.
    What else I need to do?

    Since the space is returned to Oracle only and the underlying datafile is still occupying space on the disk, the OS will not see the free space (but Oracle will).
    As suggested, if absolutely necessary to get some free space on the server, you would need to RESIZE the datafile associated with the tablespace. But, you may have to reorg the datafile before you could do that (you may get the following error message):
    03297, 00000, "file contains used data beyond requested RESIZE value"
    // *Cause:  Some portion of the file in the region to be trimmed is
    //          currently in use by a database object
    // *Action: Drop or move segments containing extents in this region prior to
    //          resizing the file, or choose a resize value such that only free
    //          space is in the trimmed.

  • 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

  • Unable to release space from table

    Hi all,
    We are unable to release space from a table called TST03 even after deletion of records.
    Followings are the information.
    Database     : 9.2
    Table Name      : TST03
    Tablespace     : LOCALY MANAGED.
    Previously there were lots of rows.
    At Present only 9 No of Rows.
    Space allocated     : 41 GB
    PCT_INCREASE     : Null
    One of the column is of LONG RAW type.
    Since the table is in LMTS, we were expecting that the space allocated will be released automaticaly after deletion of records.
    Now, what are the option left with us to release 41GB of space ?
    A. Is there any effect of "Drop storage" option of 'Truncate table' command ?
    B. If yes , can i copy all the 9 rows to a new table, then use "Truncate table TST03 drop storage", check if space is released and then copy back all the 9 rows to this table.
    C. Do you have any other easy solution apart from export/import ?
    D. Checked all the relevant Note(646681,48400,10551), could not find an easy solution. I  want to avoid offline export/import option.
    Thanks .
    Naba J Neog

    > Hi all,
    Hi !
    > We are unable to release space from a table called
    > TST03 even after deletion of records.
    >
    > Followings are the information.
    > Database     : 9.2
    > Table Name      : TST03
    > Tablespace     : LOCALY MANAGED.
    > Previously there were lots of rows.
    > At Present only 9 No of Rows.
    > Space allocated     : 41 GB
    > PCT_INCREASE     : Null
    > One of the column is of LONG RAW type.
    >
    > Since the table is in LMTS, we were expecting that
    > the space allocated will be released automaticaly
    > after deletion of records.
    Sorry, but that is not what LMTS is for. Wrong assumption.
    MaxDB e.g. returns space immediately - Oracle does not.
    > Now, what are the option left with us to release 41GB
    > of space ?
    > A. Is there any effect of "Drop storage" option of
    > 'Truncate table' command ?
    Yes, the effect is, that after the truncate the table is empty and  only one extent is allocated - the rest is returned to freespace. That's the DEFAULT behaviour of TRUNCATE TABLE.
    > B. If yes , can i copy all the 9 rows to a new table,
    > then use "Truncate table TST03 drop storage", check
    > if space is released and then copy back all the 9
    > rows to this table.
    Nope - you would have to copy the LONG RAW columns as well and this cannot be done easily from sqlplus.
    > C. Do you have any other easy solution apart from
    > export/import ?
    Nope again - you'd have to use this offline reorganisation as long as you're not on Oracle 10g and the long raw fields got converted into LOBs. With 10g you might also use the SHRINK table command. But with Oracle 9i - sorry: exp and imp (will be pretty fast for 9 rows...)
    > D. Checked all the relevant Note(646681,48400,10551),
    > could not find an easy solution. I  want to avoid
    > offline export/import option.
    Sorry - no way to avoid it and still get the free space back.
    Anyhow you might want to take actions to prevent this situtation from reoccuring.
    These kinds of questions are covered in the notes
    <a href="http://service.sap.com/sap/support/notes/48400">#48400</a>
    <a href="http://service.sap.com/sap/support/notes/66290">#66290</a>
    >
    > Thanks .
    > Naba J Neog
    You're welcome.
    Lars

  • Space under my headers using CSS

    I'm formatting the text on a website. I have a list of text
    of headers and subheaders. I have a hard return after the headers,
    and a soft return between the subheads. The problem is I don't want
    the space after the header.
    My question is: how do I get rid of the large hard return
    space after my header?
    Thanks in advance,
    Brad

    You need to redefine the bottom margin on the H4 in that
    case.
    As long as you don't have an empty <p></p> tags
    after the header or a line
    break <br>
    css:
    h4 { margin-bottom: 6px;}
    Changing the pxs to suit.
    Nadia
    Adobe� Community Expert : Dreamweaver
    http://www.csstemplates.com.au
    - CSS Templates | Free Templates
    http://www.DreamweaverResources.com
    - Dropdown Menu Templates|Tutorials
    http://www.macromedia.com/devnet/dreamweaver/css.html
    - CSS Tutorials
    "Brhaynes75" <[email protected]> wrote in
    message
    news:e2qjbg$3fb$[email protected]..
    > yes, after the <h4>. it looks like this:
    >
    > HEADER
    >
    > subhead
    > subhead
    > subhead
    >
    > so i want the space after the HEADER to be smaller.

  • Hard return paragraph breaks at top of text frames

    I'm learning how to do book layouts in InDesign CS4 and I have a problem I can't figure out how to solve. I'm autoflowing huge chunks of pasted text into linked text frames and when a paragraph breaks (with a double hard return) at the same place as a new page/column, there is a blank line on the top of the text frame like so:
    Is there a way to automatically make that paragraph break line go away when it comes at the top of a new text frame? My document is 400+ pages with many, many paragraphs. I don't want to get rid of the hard return spaces between all of them, just the ones that come at the top of text frames.

    To expand slightly, space before and after are ignored at the top of a column or frame, but the empty paragraph is not.
    You might want to try out the "Find/Change by List" sample script which fixes multiple returns along with leading and trailing whitespace and double space after a period (among other common problems). It's really just a chained set of Find/Change operations that can speed up the cleanup of new text.

  • ZFS File   system space issue

    Hi All,
    Kindly help how to resolve ZFS File system space issue. I have deleted nearly 20 GB but File system size remains the same. Kindly advice on it.
    Thanks,
    Kumar

    The three reasons that I'm aware of that causes deleting files not to return space are 1) the file is linked to multiple names 2) deleting files which are still open by a process and 3) deleting files which are backed up by a snapshot. While it is possible you deleted 20GB in multiply linked and/or open files, I'd guess snapshots to be most likely case.
    For multiple "hard" links, you can see the link count (before you delete the file) in the "ls -l" command (the second field). If it is greater than one, deleting the file won't free up space. You have to delete all file names linked to the file to free up the space.
    For open files, you can use the pfiles command to see what files a process has open. The file space won't be recovered until all processes with a file open close it. Killing the process will do the job. If you like to use a big hammer, a reboot kills everything.
    For snapshots: Use the "zfs -t snapshot" command and look at the snapshots. The space used by the snapshot indicates how much space is held by the snapshot. Deleting the snapshot will free up space unless the space is still being held by another snapshot. To free space held by a file, you have to delete all snapshots which contain that file.
    Hopefully, I got all of this right.

  • HTML code displays on one line in browser view source

    Hi,
    In Dreamweaver, my HTML code displays returns, spaces, etc. However, in the view source option in a browser (Firefox in particular), all the code is displayed on one single line. I only found about this because I was having problems with my Google Ads not displaying. (A Google customer service person helped me to find a workaround for this since I still haven't figured how to get my code to display correctly.) So I have gone to Preferences in DW and changed my Code Format Line Break type. The result is the same with each of the three options: the code is all on one line when you check it under view source in a browser. (The server is Linux.)
    Does anyone know how to fix this? Also, I think I know how this happened in the first place. I copied my code to TextEdit for a quick backup the other day, and then I pasted it back to DW. Bad idea? Is the only way to get the code back to normal to re-write it in a new HTML file in DW?

    Pssh. Problem solved, but I'm not quite sure how. I did go back and try to clean up some redundant CSS and other things, but the HTML/CSS validator still shows that I have this one invalid <header> tag (www.nextmontenegro.com), but since that was written as part of the DW template, I just left it. Weird. Anyway, the code flows down the page now.
    Thanks for the quick replies and helpful hints:-)

  • Get a query in htlm form

    I am creating a document where the content is extracted from
    a query created from the content of a MSSQL database.
    Each datarecord is the content of the document. The problem I
    am facing is that the data fields are returned as pure text
    records. When CF renders the document, the query returns text
    contents eliminates all the returns spaces and paragraph format.
    When the content of the return record is a document section
    with several paragraphs, the resulting query returns all the text
    together but without the text return spaces and all the paragraph
    are run together.
    You can see what I see in
    http://www.spccwriter.com
    userid: test pasw:123 hit Get SPCC . The document pw is: test
    You will notice that many of the section run the paragraph
    together suppresing the return to separate a paragraph from another
    (Like in section 112.2 Definitions).
    Any hint how to do this correctly? I am not sure if the trick
    resides in the CF coding or in the cfquery Database formating
    parameters.

    I am trying to use the example from Adobe DOC
    <h3>ParagraphFormat Example</h3>
    <p>Enter text into this textarea, and see it returned
    as HTML.
    <cfif IsDefined("FORM.myTextArea")>
    <p>Your text area, formatted
    <p><cfoutput>#ParagraphFormat(FORM.myTextArea)#</cfoutput>
    </cfif>
    <!--- use #Chr(10)##Chr(13)# to simulate a line
    feed/carriage
    return combination; i.e, a return --->
    <form action = "paragraphformat.cfm">
    <textArea name = "MyTextArea" cols = "35" ROWS = 8>
    This is sample text and you see how it scrolls
    <cfoutput>#Chr(10)##Chr(13)#</cfoutput>
    From one line
    <cfoutput>#Chr(10)##Chr(13)##Chr(10)##Chr(13)#</cfoutput>
    to the next
    </textArea>
    <input type = "Submit" name = "Show me the HTML
    version">
    </form>
    Tis sample returns nothing. Has anyone tried this?

  • Applescript find/change problem

    I have some text which needs to be styled in InDesign CS4 which has a bunch of extraneous tags ( eg. <b>, <i>, etc.). I have customised the FindChangeList.txt file that supports the FindChangeByList.applescript file to do things like:
    {find what:"<i>"}
    {change to:"^S"}
    which can then be picked up by a nested style. All good so far.
    Problem: the applescript will just not 'see' the strings <b> or </b> in FindChangeList.txt. It treats them like they aren't there. I can do it using the find/replace within InDesign, it works fine there, but my problem is that I have hundreds of pieces of copy to import and I'd like to automate as much as possible. Using GREP has the same effect, ie. works in find/replace within InDesign, but not with applescript.
    Any help would be greatly appreciated as this is really killing me at the moment. Thanks!
    Content of FindChangeList.txt follows. The command in the final line works, the command in the second-last line doesn't.
    (FYI the second line of code contains 'InDesign CS3' regardless of whether I use CS3 or CS4. I guess they didn't update the file)
    --FindChangeList.txt
    --A support file for the InDesign CS3 AppleScript FindChangeByList.applescript
    --This data file is tab-delimited, with carriage returns separating records.
    --The format of each record in the file is:
    --findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
    --Where:
    --<tab> is a tab character
    --findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
    --findProperties is a properties record (as text) of the find preferences.
    --changeProperties is a properties record (as text) of the change preferences.
    --findChangeOptions is a properties record (as text) of the find/change options.
    --description is a description of the find/change operation
    --Very simple example:
    --text          {find what:"--"}          {change to:"^_"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find all double dashes and replace with an em dash.
    --More complex example:
    --text          {find what:"^9^9.^9^9"}          {applied character style:"price"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find $10.00 to $99.99 and apply the character style "price".
    --All InDesign search metacharacters are allowed in the "find what" and "change to" properties.
    text          {find what:"<b>"}          {change to:"^S"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find all bold and replace with non-breaking space.
    text {find what:"<i>"} {change to:"^S"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find all italics and replace with non-breaking space.

    You probably should post this in the ID Scripting forum. Here's an example of some simple AppleScript find and changes that might help:
    --find and replace keyboard formating
    tell application "Adobe InDesign CS5.5"
         --first clear the preferences
         set find text preferences to nothing
        set change text preferences to nothing
        --replaces non breaking space with space
        set find what of find text preferences to "^s"
        set change to of change text preferences to "<0020>"
        set myFoundItems to change text
        --replaces soft return with return
        set find what of find text preferences to "^n"
        set change to of change text preferences to "^p"
        set myFoundItems to change text
        --replaces return space with return
        set find what of find text preferences to "^p<0020>"
        set change to of change text preferences to "^p"
        set myFoundItems to change text
        --replaces 2 returns with return
        set find what of find text preferences to "^p^p"
        set change to of change text preferences to "^p"
        set myFoundItems to change text
        --replaces return, tab, return with return
        set find what of find text preferences to "^p^t^p"
        set change to of change text preferences to "^p"
        set myFoundItems to change text
        --replaces space, return with return
        set find what of find text preferences to "<0020>^p"
        set change to of change text preferences to "^p"
        set myFoundItems to change text
        --replaces space, space with space
        set find what of find text preferences to "<0020><0020>"
        set change to of change text preferences to "<0020>"
        set myFoundItems to change text
        --replaces 3 tabs with tab
        set find what of find text preferences to "^t^t^t"
        set change to of change text preferences to "^t"
        set myFoundItems to change text
        --replaces 2 tabs with tab
        set find what of find text preferences to "^t^t"
        set change to of change text preferences to "^t"
        set myFoundItems to change text
    end tell

  • Indesign Export PDF Issue

    I have been having a random problem happen with Indesign cs5 and cs5.5
    We can Create Postscript and then Distill the file and the File comes out ok.
    We need to create a searchable PDF so the client can search out words with Ligatures and Conditional Hypens so we export to PDF via Indesign.
    The text should look like this:
    Boucek, M. M. et al. 2008. Pediatric heart transplantation after declaration of cardiocirculatory death. New England Journal of Medicine 359:709–14.
    When we export to PDF we get the below:
    Boucek, M. M. et al. 2008. Pediatric heart transplantation after declaration of cardiocirculatory death. New England Journal of Medicine3 59:709–14.
    The space between the Medicine and the 359: swaps with the 3
    New England Journal of Medicine3 59:709–14.
    The formatting is
    Adobe Garamond Pro
    Regular
    9pt 12pt leading Kerning Optical Tracking 0 case normal postion normal
    Justification: 85/100/190 letterspacing 0/0/0 glyph scaling 100/100/100
    Auto Led 120
    Single Word Fully Justified
    Composer Single Line Composer
    Open type
    Contextual Alternates
    Propotional Oldstyle
    The text in indesign looks like this.
    <Adobe Garamond Pro-Regular>Boucek, M. M. et al. 2008. Pediatric heart transplantation after declaration of cardiocirculatory death.#</Adobe Garamond Pro-Regular><Adobe Garamond Pro-Italic>New England Journal of Medicine</Adobe Garamond Pro-Italic><Adobe Garamond Pro-Regular>#359:709–14.</Adobe Garamond Pro-Regular><return>
    # = space
    This seems to happen any way I export to PDF
    I make sure we clear font caches before we open the job we restart the mac before we create the PDF file.
    Does anyone have any ideas what causes this and what work around can be done.
    I have to keep the job in 5/5.5
    Thank you
    Matt

    A bit more information:
    It seems that this happens when going from an Italic font to a Roman weight but only when the roman is one of the following characters after a space  (,1-9, [ but it doesn't happen all the time.
    I had another job where the <italic>Nibelungeb</italic><Roman>#(1848-74).</Roman><return>
    it ended up doing this
    <italic>Nibelungeb</italic><Roman>(#1848-74).</Roman><return>
    # = Space
    - = Ndash

  • Why, when I copy and paste a shape are the rest of the pages in the doc being deleted?

    I am trying to add an identical formatted shape below the first formatted shape, but when I select, copy, paste, it is deleting the following pages of the doc.  If I'm not careful, I will lose the rest of the doc.  What is going on? 
    If I select the shape I want to copy, it is outlined in blue and under Arrange the Group/Ungroup options are greyed out. 
    There is plenty of space for the new pasted image on the page and I just click below the original image being copied to paste it. 
    And sometimes there is this thick blue line at the top of the page when copy/paste -> dissapear.  What is that?
    Also, a pasted object always defaults to Inline instead of Floating, so a new image snaps to a grid.  Anyway to change that? 

    Sorry I didn't notice that you are on iOS.
    There are two kinds of Pages documents, Word Processing and Layout.
    Word Processing documents have text on every page that automatically flows on to the next page if it does not fit on the current page. A page only is shown on screen if it has text on it. Floating objects don't count.
    If you have a complicated set of objects with wrap pushing text out of the way and text being consequently pushed over to the enxt page, odd things can happen as that text, which includes invisibles like returns, spaces, tabs, page breaks etc push over to the next page or flow back to previous pages as you move objects and make room for the etxt or not.
    Layout documents, do not auto flow from page to page. Each page is an individual section and things stay where you put them.
    It sounds like you may be better off using a Layout template for your work. Choose one from the Template/Document Chooser.
    Peter

  • Problem with XSU

    select trim(st.sql_text) as SQL from sys.v_$sqltext st, v$session se where st.address = se.sql_address and st.hash_value = se.sql_hash_value and se.sid = " + sid + " order by piece
    This query when used in OracleXMLQuery(conn, query).getXMLDOM() returns spaces in the last element tag at the end. This causes
    an error in IE or in the XSL processor of
    xmlparserv2.
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <SQL>SELECT OWNER,TABLE_NAME FROM ALL_ALL_TABLES O WHERE O.OWNER NOT</SQL>
    </ROW>
    <ROW num="2">
    <SQL>IN ('SYS','SYSTEM','CTXSYS','MDSYS','MTSSYS','ORDSYS','ORDPLUGIN</SQL>
    </ROW>
    <ROW num="3">
    <SQL>S','DBSNMP','OUTLN') ORDER BY 1,2 </SQL>
    </ROW>
    </ROWSET>
    An invalid character was found in text content. Line 10, Position 47
    Any help would be appreciated.
    Bob Johnson
    null

    Somebody please answer this question?

Maybe you are looking for

  • Photoshop CS5 Very Slow Liquify

    I've noticed that in Photoshop CS5, Liquify just works terribly slowly. When I click and drag to distort an image, the image gets distorted sometimes even 10 seconds after I've lifted my hand. Sometimes I have to wait 30-40 seconds for the distortion

  • User exit to set  GR field in PO while creation

    Hi All, I have requirement where we have to tick check box for GR under delivery tab in line item details of Purchase order depending on some conditions. Say, if company code is 'X' and material group is 'Y' then only this check box should get ticked

  • PSE 6 problem with JPG extension

    I have just scanned and edited 3 photos without trouble.  However, when I go to print them, I can't.  The program has not given them an extention, even though I saved them as JPG.  I have tried doing it over twice now, but it's not working.  I've nev

  • Upgrade Windows 8.1 basic to Pro Edition

    I got the laptop with windows 8.1 basic edition, now i need to upgrade this to Pro edition or Enterprise edition, how i need to so. When i cal to customer service they gave me a prompt reply like its a matter of entering license key no need format an

  • Access Denied Error Trying to Restore Database

    I have a database backup of a 2008R2 database sitting on Machine1.  I want to restore it to Machine 2, which is SQL 2012.  both machines are on the same domain.  Below is my script but I am getting the error" The operating sytem returned the error '5