Forum Discussion

MichaelTamoush's avatar
MichaelTamoush
Qrew Captain
3 years ago

Search all parts of a combined text field and delete parts that contain a certain string

Is there a way to search all parts in a combined text field, and then delete the entire part based off conditions? I can't use filters on my summary field, so I need to do this once the combined text field has been looked up a few times. I can think of ways to do it if I check each part, and simply repeat the code for the max # of parts I anticipate having, but was wondering if there is a sneaky way to do it without breaking it into individual parts. I'm thinking of searching and replacing everything after a certain text string, until the next semicolon, perhaps?​

------------------------------
Mike Tamoush
------------------------------

4 Replies

  • Can you give an example of the string to be searched and what you are searching on to get a hit?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MichaelTamoush's avatar
      MichaelTamoush
      Qrew Captain
      For example a record might include the following:

      [Fiscal Year of Travel Start]  Example: 2021
      [Combined Text Field] Example: 2021+Words and prices ; 2021+Different Words and Prices ; 2022+Words and prices ; 2022+Different Words and Prices

      My goal:

      Formula which says, if Fiscal Year of Travel Start = 2021, then only keep parts with 2021+.

      After that, ill do a search and replace to get rid of the 2021+, or whatever fun stuff I want to do. Note - the plus '+' sign I only include because I find it helpful in searchandreplace or using left or right, as my 'Words and Prices' can actually include 2021 coincidentally, so I just stick an impossible character onto my 2021 just in case.....

      ------------------------------
      Mike Tamoush
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        Normally I would do a brute force solution and use multiple formula variables to Persaud the individual parts and then have a big gift statement to look for when I want.

        But it really sore to ago they gave us a new function called FIND. 


        This works exactly the same as it does an example where it will give you the position where a certain phrase is located.

        I have not had a reason to use that myself but I may give it a try if I get a moment using your example.



        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------