Results 1 to 5 of 5
  1. #1
    Newbie
    Join Date
    September 28th, 2005
    Posts
    20
    Displaying parts of fields
    Hello there

    Is there any way of displaying, for example, just the last three or four characters of a given field reading from either left or right?

    I can see there is a MaxLen feature but what I want isn't the same thing.

    Thanks


    Phillip

  2. #2
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    Thank you for writing, Phillip. There isn't a way to do that currently, but it may not be too hard to include a general facility for trimming text to a specified range. For example, one could specify "1 to 100" to get the first 100 characters, or "-100 to -1" to get the last hundred characters.

    But before I dive into making that, it would be helpful to make sure I understand how it will be used. Could I trouble you to describe what sort of data you need to parse?
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  3. #3
    Newbie
    Join Date
    September 28th, 2005
    Posts
    20
    Displaying parts of a field
    Thanks. The field I want to use has date info like this "March 2008" or "Late 2009".

    What I want to do is just display the Year, eg "2008". Hence my enquiry about displaying just the last four characters.


    Phillip

  4. #4
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    Hmmm.... should we add another attribute to the WM-Field tag for this? What should the syntax look like?
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  5. #5
    Newbie
    Join Date
    September 28th, 2005
    Posts
    20
    Hello Richard

    The sort of thing that I had in mind (copied directly from MS Access and adapted slightly for WebMerge) is:

    =Left([WM-Field: ProductName], 1) Displays the first character of the value of the ProductName field.
    =Right([WM-Field: AssetCode], 2) Displays the last 2 characters of the value of the AssetCode field.


    Phillip

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Some Shops NOT Displaying
    By joyaz in forum PopShops
    Replies: 1
    Last Post: December 14th, 2008, 01:36 PM
  2. Displaying images - AE
    By Sunny123 in forum Cusimano.com Scripts
    Replies: 2
    Last Post: December 12th, 2006, 12:23 AM
  3. Images Not Displaying ??
    By BurgerBoy in forum Midnight Cafe'
    Replies: 7
    Last Post: January 19th, 2006, 09:02 PM
  4. Replies: 1
    Last Post: February 9th, 2005, 12:49 PM
  5. Displaying Results
    By cowox in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: December 19th, 2002, 03:36 PM

Posting Permissions

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