Groups | Search | Server Info | Login | Register


Groups > comp.databases.filemaker > #712

Re: Help with extracting text

From HelpfulHarry@BusyWorking.com (Helpful Harry)
Newsgroups comp.databases.filemaker
Subject Re: Help with extracting text
Date 2012-03-25 09:40 +1200
Organization Aioe.org NNTP Server
Message-ID <HelpfulHarry-2503120940330001@203-118-187-72.dsl.dyn.ihug.co.nz> (permalink)
References (1 earlier) <HelpfulHarry-2303121314060001@203-118-187-217.dsl.dyn.ihug.co.nz> <4b8c5df0-d5a3-4c8c-b18a-dcb6b285c2e0@fk28g2000vbb.googlegroups.com> <HelpfulHarry-2403121208100001@203-118-187-238.dsl.dyn.ihug.co.nz> <slrnjmqnjv.lv.t-usenet@ID-685.user.individual.de> <jkkvf0$3m1$1@news.motzarella.org>

Show all headers | View raw


In article <jkkvf0$3m1$1@news.motzarella.org>, Howard Schlossberg
<howard@nospam.fmprosolutions.com> wrote:

> On 3/23/2012 10:41 PM, Martin Τrautmann wrote:
> > On Sat, 24 Mar 2012 12:08:10 +1200, Helpful Harry wrote:
> >>   Each Substitute function replaces every occurrence of the appropriate
> >>   number (0, 1, 2, etc.) with an empty string / nothing (i.e. "").
> >
> > which does remove any number within the later text as well.
> >
> > We don't know what's there instead of apples and bananas - but you will
> > find numbers within text many times.
> >
> > Instead of too many substitutes you might use the filter option, too.
> 
> 
> You're right, of course, though I had to make an assumption following 
> Harry's example.
> 
> If I were doing this with a "modern" version of FileMaker and I had 
> concerns about there possibly being numbers in my desired values, then I 
> would probably use a custom function such as CustomList() at 
> http://www.briandunning.com/cf/868
> 
> I could then use this to only grab middle(x, 4, 99999) of each value in 
> the list.  Or if a concern was that the numbers could go higher than two 
> digits, I guess the customList function would have to grab middle (x, 
> position(x, " ", 1, 1)+1, 99999).

Probably the most obvious solution, although not the most elegant or
efficient, is simply a pile of If statements:

     If (Position(TextField; "01 Apple"; 1; 1) = 1; "AppleR"; "")
   & If (Position(TextField; "02 Banana"; 1; 1) = 1; "BananaR"; "")
   & If (Position(TextField; "03 Orange"; 1; 1) = 1; "OrangeR"; "")
   & ...
and then remove any trailing return / paragraph character.

You could obtain the values to look for from the Value List definition
rather than hard-coding them, but it would need to be updated if more
values were added.

Helpful Harry  :o)

Back to comp.databases.filemaker | Previous | NextPrevious in thread | Find similar


Thread

RE: Help with extracting text JayBee <Jennifer_Beecroft@hotmail.com> - 2012-03-21 09:33 -0700
  Re: Help with extracting text Martin Τrautmann <t-usenet@gmx.net> - 2012-03-21 16:42 +0000
    Re: Help with extracting text HelpfulHarry@BusyWorking.com (Helpful Harry) - 2012-03-22 11:24 +1200
  Re: Help with extracting text HelpfulHarry@BusyWorking.com (Helpful Harry) - 2012-03-23 13:14 +1200
    Re: Help with extracting text JayBee <Jennifer_Beecroft@hotmail.com> - 2012-03-23 02:42 -0700
    Re: Help with extracting text JayBee <Jennifer_Beecroft@hotmail.com> - 2012-03-23 02:47 -0700
      Re: Help with extracting text HelpfulHarry@BusyWorking.com (Helpful Harry) - 2012-03-24 12:08 +1200
        Re: Help with extracting text Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2012-03-23 20:28 -0700
          Re: Help with extracting text HelpfulHarry@BusyWorking.com (Helpful Harry) - 2012-03-24 16:45 +1200
        Re: Help with extracting text Martin Τrautmann <t-usenet@gmx.net> - 2012-03-24 05:41 +0000
          Re: Help with extracting text Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2012-03-24 10:15 -0700
            Re: Help with extracting text HelpfulHarry@BusyWorking.com (Helpful Harry) - 2012-03-25 09:40 +1200

csiph-web