Results 1 to 9 of 9
  1. #1
    Newbie
    Join Date
    September 28th, 2005
    Posts
    20
    How can I replace commas. Replace wont' do it
    Is it me or is it Webmerge?

    I cannot get the "replace" facility to remove commas in my fields.

    I have a field called MonoRefDesc containing the following text for example
    Volume 11, number 10

    I have over 300 different records to deal with.

    I want to replace the comma so the text goes
    Volume 11 number 10

    I have used this syntax
    [WM-Field: MonoRefDesc replace(",","")]
    but it just doesn't work. I can get it to replace words, for example I can get it to replace "number" with "issue" but it just won't deal with a comma. I have tried
    [WM-Field: MonoRefDesc raw replace(",","")] but this doesn't work either.
    I have tried writing comma as a comma eg
    [WM-Field: MonoRefDesc replace("comma","")]
    but still no joy.

    Anybody any ideas about this?

    Thanks

  2. #2
    ABW Ambassador
    Join Date
    January 4th, 2006
    Location
    USA
    Posts
    2,477
    Why don't you replace the "," from your original data feet, say excel sheet, instead of repalcing them on WM?

    Some excel guru should be able to help out on that.

  3. #3
    Newbie
    Join Date
    September 28th, 2005
    Posts
    20
    Quote Originally Posted by atonca
    Why don't you replace the "," from your original data feet, say excel sheet, instead of repalcing them on WM?

    Some excel guru should be able to help out on that.
    Thanks for the suggestion which is my fallback position. However I want to use this field elsewhere on my website with the comma included.

  4. #4
    Member
    Join Date
    January 18th, 2005
    Posts
    99
    Create a duplicate column in Excel, replace the commas in one column and leave the second column with the commas.

  5. #5
    Member MarkJH's Avatar
    Join Date
    January 18th, 2005
    Posts
    68
    Can you use:

    & # 4 4 ; (separated out because this forum converts it to a standard comma)

    instead of the comma in the replace code?

    Something like:

    [WM-Field: MonoRefDesc replace("& # 4 4 ;","")]

    just remember to remove the spaces inbetween the & # 4 4 and ;.
    [b][url=www.bandlink.net]Bandlink.net[/url][/b]

  6. #6
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    Have you tried using the "comma" and "empty" constants?:

    [WM-Field: MonoRefDesc replace(comma,empty)]

    Also, is the feed comma-delimited?
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  7. #7
    Newbie
    Join Date
    September 28th, 2005
    Posts
    20
    Thanks but...that doesn't work either!
    Hello Richard and MarkJH and others - thanks for your replies.

    I tried

    [WM-Field: MonoRefDesc replace(comma,empty)]

    and

    [WM-Field: MonoRefDesc replace(",","")]

    but they don't work either!

    The fields are tab delimited and text values are in quotes.

    I have now done a workaround by some Active Server page coding.

    However it would be good to know how to use the replace feature for commas for future reference!



    Phillip

  8. #8
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    Feel free to email me a zip archive with the template, settings file, and a <2MB portion of the source file and I'll look into this.
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  9. #9
    Newbie
    Join Date
    September 28th, 2005
    Posts
    20
    How can I replace commas
    Thanks I have sent the zip file to web2007@fourthworld.com

  10. Newsletter Signup

Closed Thread

Similar Threads

  1. Replace Tag
    By misterdave in forum WebMerge (Fourthworld.com)
    Replies: 1
    Last Post: February 26th, 2007, 11:58 AM
  2. Do we have to replace all our CJ links?
    By Morethanable in forum Midnight Cafe'
    Replies: 1
    Last Post: June 28th, 2006, 04:47 PM
  3. Using the replace attribute
    By Primrose in forum WebMerge (Fourthworld.com)
    Replies: 5
    Last Post: October 14th, 2004, 05:30 PM
  4. lex replace
    By java in forum Commission Junction - CJ
    Replies: 0
    Last Post: January 19th, 2002, 11:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •