Forum Discussion

JeffPatrick1's avatar
JeffPatrick1
Qrew Member
2 years ago

Two Text List Fields - Find value in one and corresponding value in the other Text List

Hi - I have two Text List fields in a table representing tags and their tag id's:

Tag List
Here is sample data             tag1,tag2, tag3

Tag ID List
Here is sample data              8,10,14

There are three tags (tag1,tag2,tag3) and their Tag IDs are 8,10, and 14

I want to search Tag List to find a specific tag, and return the corresponding Tag ID for that Tag.

Is there any way to do this in a formula field?

Thanks

Jeff



------------------------------
Jeff Patrick
------------------------------

4 Replies

  • Can you explain the structure of your app so far with respect to these tag names and tag numbers?  

    For example is this
     tag1,tag2, tag3

    On a record in a long text field or is that multiple records.

    When you say "search",  are we just searching the data on one record or on many records?

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • JeffPatrick1's avatar
      JeffPatrick1
      Qrew Member
      Hi Mark - Tag List and Tag ID List are text fields on a single record. Search in this case means look (only) at the Tag List text field, find the position of a particular Tag in the list, and then find the corresponding position in the Tag ID List. So, everything is happening on a single record.

      ------------------------------
      Jeff Patrick
      ------------------------------
      • JeffPatrick1's avatar
        JeffPatrick1
        Qrew Member
        I know I can use Part() function to pull in the Tag ID from the Tag ID List field but I can't figure out how to get the Tag List item # (i.e. not the character position in the text string but rather the nth item on the Text List).​

        So, here is the example:

        Tag List   
        Sample data   tag1,tag2,tag3

        Tag ID List
        Sample data   10,14,18

        Is there a function to look at Tag List and find "Tag2" and return Position 2 in the list.

        Then, I can use the function: Part([Tag List],2,",") to produce "14" - the second item on the Tag ID list.

        ------------------------------
        Jeff Patrick
        ------------------------------