Forum Discussion

TimT's avatar
TimT
Qrew Trainee
2 years ago

Removing duplicates from a textlist

Hello!

Was hoping I can get help with this problem.

I'm using a query formula to get a list of emails from another unrelated table and it works just fine, however, it gives me duplicates which i'd like to get rid of somehow. Has anyone dealt with this issue before?

example textlist:
brucewayne@email.com ; theflash@email.com ; brucewayne@email. com ; brucewayne@email. com ; theflash@email.com; theflash@email.com ; superman@email.com

desired outcome:
brucewayne@email.com ; theflash@email.com ; superman@email.com

I can either make a new field to get the desired outcome or perhaps there's a way for me to stop duplicates on the query formula?

5 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Qrew #1 Challenger
    The trick is to flag the source record with a flag on the source record as to it its's the Record with the lowest Record ID# of all its "brothers".

    I can help with the syntax if need be but pull a text list Query within the source table to pull back all the records with the same email address as the record.  Pull in the value of Field ID # 3 which is the Record ID#. into a text list query result then convert to regular text and hive off the leftmost value.  That will be the lowest record # of all the brothers with the same email address.  Then have an IF statement formula to check if the Record ID# of the brother is the lowest one and if so flag it as OK to pull.

    The adjust your current formula query to only pull in ones that are flagged as being OK to pull.​​

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • TauryAnderson1's avatar
      TauryAnderson1
      Qrew Member
      I like your solution for removing duplicates, but now I have on that is more complicated.  My formula query pulls text values from it's sibling records where we might have a list like this:

      red
      blue
      green
      green
      blue
      red
      red

      I want my formula query result to be:

      red; blue; green

      not 

      red; blue; green; green; blue; red; red

      I am basically trying to use a Formula Query to get Summary field results from sibling records. 

      (There is a wide ranch of variability of choices in the field in question, so I cannot call out each option individually in a formula)


      ------------------------------
      Taury Anderson
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew #1 Challenger
        Can you post your formula query code?

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------