0

want to use a button to check if the content of A in table 1 is the same as the content in the associated table 2….

I have two tables (1&2), I want to use a button to check if the content of A in table 1 is the same as the content in the associated table 2, and the number is also the same (the content of A may be numbers or text). How should I write the code, give me some ideas, thank you for your reply.

5 replies

null
    • Fred
    • 2 mths ago
    • Reported - view

    is the data in field "A" in table "1" always going to be deliminated by a paragraph mark? If not then what else could be the deliminator?

    is the data in field "A" in table "2" always going to be just a single piece of data and not multiline text like in table "1"?

    what is the button supposed to do after checking for similar content?

    • Fred
    • 2 mths ago
    • Reported - view

    I decided to use a new view element so you can instantly see any duplicates.

    As you change the data in "A" in table "1", you can see how the records in Duplicate Records change.

    The code for the view element is:

    let newArray := split(A, urlDecode("%0A"));
    '2'[var x := A;
        count(newArray[= x]) > 0]
    

    Line 1, creates an array of the values in A based on paragraph marks.

    Lines 2&3, takes the records in the subtable '2' and compares the data in A to each value in line 1.

      • gold_cat
      • 2 mths ago
      • Reported - view

       thanks fred 👍

    • gold_cat
    • 2 mths ago
    • Reported - view
     said:
    urlDecode("%0A")

     I learned new code.

Content aside

  • Status Answered
  • 2 mths agoLast active
  • 5Replies
  • 36Views
  • 2 Following