Discussions

Expand all | Collapse all

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

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

    Posted 5 days ago
    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
    ------------------------------


  • 2.  RE: Search all parts of a combined text field and delete parts that contain a certain string

    Posted 5 days ago
    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
    ------------------------------



  • 3.  RE: Search all parts of a combined text field and delete parts that contain a certain string

    Posted 5 days ago
    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
    ------------------------------



  • 4.  RE: Search all parts of a combined text field and delete parts that contain a certain string

    Posted 5 days ago

    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
    ------------------------------



  • 5.  RE: Search all parts of a combined text field and delete parts that contain a certain string

    Posted 5 days ago
    Edited by Mike Tamoush 5 days ago
    I just did brute force and have it working, so i could do my copy paste now for as many parts as I anticipate. However, I'll also check out the find function (I didnt know about it) and post back if it works for my use case. Thanks!

    Update: I think find is not helpful in my scenario? Let me know if you find otherwise. Near as I can tell it only gives me the position of the first instance of my string, so even if I can use it I need to at some point brute strength it and check every part.

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