Re: Wildcards in Calculations
- From: Howard Schlossberg <howard@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 27 Oct 2008 12:35:46 -0700
If that 'x' will be the only 'x' (i.e. no x's in the unit size, ea, ml, etc.), then you can do this:
leftwords(substitute(Package Size, "x", " "), 1)
VoicesInMyHead wrote:
Ok, I know it's been awhile since the last time I was here. My.
company switched from FMP to SQL. Doh! So, now I have all this SQL
crap floating around in my head, and I need to make a new FMP layout
on a system that has not yet been changed over.
Anyway, I have a text field (Package Size) with the following:
60 EA
240 ML
100 EA
25X20ML
180 EA
42X5ML
Fact: Each line with an "x" has no spaces.
Fact Each line without an "x" does have a space
I need to extract the number from the left up to the space or the x.
Once I get this worked out, I will have to also extract the number to
the Right of the "x" into a different field, but I think I can work
that out.
Current Attempt:
If(Package Size = "*x*";
Left(Package Size;Position(Package Size;"x";1;1));
Left(Package Size;Position(Package Size;" ";1;1)))
I am assuming it's a problem with my 'search' for the "x" - but I am
running around in circles in my head... and it's crowded in there!
Anyone care to correct me? Thanks!
- References:
- Wildcards in Calculations
- From: VoicesInMyHead
- Wildcards in Calculations
- Prev by Date: Wildcards in Calculations
- Next by Date: Re: Record ID properties in FM5
- Previous by thread: Wildcards in Calculations
- Next by thread: Re: Wildcards in Calculations
- Index(es):
Relevant Pages
|
Loading