Hope i am using this forum correct.
heres expression have using script step Find/Replace (Find/Next):
Set variable $Counter =0
Length ( MiddleWords ( Field2Search ; $Counter ; 1)) > 10 ; MiddleWords ( Field2Search ; $Counter ; 1) ; "")
performs find ok increases and highlites only those strings (words) that are >10 BUT WHEN IT IS < =10 IT SHOWS NOTHING NO HIGHLIGHT WHILE CLICKING CONTINUING PAUSE UNTIL IT LOCATES string >10 then it highlights.
Filemaker 12 advance
Ok.... i getting my script to work!!
It finds selected strings (words) that are of a chosen length:
length ( GetWord( SearchField ; $counter) ) > 10 ;
GetWord( SearchField ; $counter) ; "")
BUT HOW DO _i_ hook up Filter(textToFilter) to this so _i_ get only numbers?????
THIS "IS" WHERE _i_ am STUMPED!!
Paste a good sized selection of the actual data. It would be good to see an example of what sort of data you're encountering, and what sort of data you'd like once everything is done. It will help people understand exactly what you're trying to accomplish.
Simply their various lengths
bank reference number.
all mixed in with other alphanumeric text.
heres update summary of my situatio:
how can one use FindReplace in a lengthy global alphanumeric text field for locating digit / number strings greater than length 10.
And in my loop when returning results desire to display the patternCount of what was found and then along with option to Replace 1 or Replace All.Thank You Much For
Your Time Energy
..Productive Healing Earth Endeavors""Once A Soldier Always A Soldier"United States American War Veteran
From&For "America's Heart Land Peace"Jesus Mourning Sun
alias Robert Lewis•~•~•~from~•~•~•
|||()||| |||()|||_business name_|||()||| |||()||| ||()||
Length ( Filter ( YourTable::YourField ) ; "0123456789" )
That will give you a number equal to how many numbers you had in your field.
You've been given the answer twice now.
Once at 6:47AM and once at 8:24AM.
Here's sample of 1 value line
03/28/2008 Refund card 08/27 walmart #1388 Super Center 800-312-3344 3546896542323 $50.00 $2,545.88
bunch of reference numbers.
want to find them. delete them. While maintaining all other data. in the values. Values separated by carriage returns. All in a global text field.
Just trying to clean up unwanted text. Then will enter my values into records, later.
1. Loop through the text pulling out each line like you showed here (Use GetValue).
2. Convert the spaces to carriage returns ("¶") with Substitute.
3. Loop through each line of your new list testing for the presence of your number pattern.
4. Note the value number of the line that has the offending number (n).
5. Create a variable with the values 1 to n-1 and n+1 to ValueCount ( original line converted to list )
6. Substitute spaces back in for carriage returns
7. Build a new Variable by adding each modified line to it
8. When done building your new list, set it back to the original field replacing the original contents.
thats much some, what i got going!!
still a bit unsure about how to write expression to find a certain length number digit string (word)???
Length ( filter ( getWords( field ; $Counter) ; "0123456789")
i believe that's it above!! As was earlier pointed out!!!
not in front of my machine right now but do believe the above express will work In the loop.
It appears that my string detection using a input field for choosing length AND another input field for filtering can evolve, to do the same thing and much more than the ol PatternCount function because when detecting strings employing Length and Filters allows you to have more elegant calculations/ specific Finds.
Yes you don't need pattern count, but you do need to look at only one value at a time, which is why I suggested converting your line to a list and evaluating one word at a time with GetValue. The same thing could be done by using MiddleWords and looping through each word. It's just that middle words can find other things than spaces to define the boundaries of a word with, so I tend to shy away from it. Converting spaces to carriage returns and using the "Value" functions seems more reliable to me.
Your length test won't work as written however, because GetWords is not a function. You would use MiddleWords with this approach:
Length ( Filter ( MiddleWords ( $text ; $counter ; 1 ; 1 ) ; "0123456789" ) ) > 11
The calc for the list approach would be:
Length ( Filter ( GetValue ( $text ; $counter ) ; "0123456789" ) ) > 11
There need checking "Filter() ed value = original text" before checking length, to avoid