Ask a Question related to FileMaker, Design and Development.
-
Compare 2 fields & delete everything in "field 2" that occurs in "field 1"
Is it possible to compare 2 fields and delete everything in "field 2" that
also occurs in "field 1" ?
FIELD1 800-555-1212 for Waterpocket Fold
FIELD2 800-555-1212 for Red Circle Cliffs
New FIELD2 Red Circle Cliffs
Any suggestions are most welcome
Guest
-
"Page" and "Rect" props of the Field prop in Javascript API
Page property of the Field property in Javascript Acrobat API returns an array of pages that this field exists in. On the other hand, "rect" property... -
CFINPUT type="radio" w/ "value" requires "label"
On a Flash form, when you specify type='radio' and value='whatever', the value of the 'value' attribute will be displayed as a label if no 'label'... -
Request.Form("Field Name") Versus Request.QueryString("Field Name")
I want to know what's the differences between Request.Form("Field Name") and Request.QueryString("Field Name") OR they function exactly the... -
dr("field").toString returns "400.0000" instead of "400"
I have just installed VS.NET 2003 on my computer. I have a project that I have been developing on VS.NET 2002. I haven't upgraded this project to... -
"Start" "Program" "Menu" list is empty
For what ever reason my list of installed programs in my "Start" "Programs" menu is empty. Anyone know how to restore the list. Thanks for your... -
marianopeterson #2
Re: Compare 2 fields & delete everything in "field 2" that occurs in "field 1"
I think you'd have to create a calc field that compares the two fields:
If( field1 = field2, "duplicate", "other")
Then you could search within the calc field for the word "duplicate".
Once you attain your desired found set, then perform a replace on
field2, replacing the contents with "" (emtpy string).
--
Mariano Peterson
Posted via [url]http://dbforums.com[/url]
marianopeterson Guest
-
Lynn allen #3
Re: Compare 2 fields & delete everything in "field 2" that occurs in "field 1"
<aloysius99@sbcglobal.net> wrote:
Well, what exactly do you want to delete? Word by word, or longer (or> Is it possible to compare 2 fields and delete everything in "field 2" that
> also occurs in "field 1" ?
>
>
> FIELD1 800-555-1212 for Waterpocket Fold
>
> FIELD2 800-555-1212 for Red Circle Cliffs
>
> New FIELD2 Red Circle Cliffs
>
> Any suggestions are most welcome
shorter) strings?
For word by word, it's easy enough. You'll need a global text field and
a global number field counter or two.
Use Set Field to put the first word into a global field (just for
processing purposes, this can be done without this step but it's easier
to see and debug using the holding global), and use Substitute to delete
it from the second field. Then loop through, setting each succeeding
word into the global using Middle Words, using Substitute again, and
incrementing the counters until you run out of words in the first field.
Use the counters to locate yourself within the first field, moving along
from word to word.
Then run a Trim on the second field to get rid of leading or following
spaces. You might also use a Substitute to get rid of more than single
spaces in the middle of the string and cycle through until the field is
clean.
How to handle the last word in the first field is left to the student as
an exercise. ;) And, take note, do NOT turn User Abort (Off) until after
your loop is fully tested and working!
--
Lynn Allen Allen & Allen Semiotics
FSA Associate Filemaker Consulting & Training
[email]lynn@semiotics.com[/email] [url]http://www.semiotics.com[/url]
Lynn allen Guest



Reply With Quote

