Compare 2 fields & delete everything in "field 2" that occurs in "field 1"

Ask a Question related to FileMaker, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. "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...
    2. 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'...
    3. 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...
    4. 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...
    5. "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...
  3. #2

    Default 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

  4. #3

    Default Re: Compare 2 fields & delete everything in "field 2" that occurs in "field 1"

    <aloysius99@sbcglobal.net> wrote:
    > 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
    Well, what exactly do you want to delete? Word by word, or longer (or
    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

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139