Forum Discussion

Jake_Raz's avatar
11-07-2024
Solved

Filter based on length of string value?

Hello! I'm trying to figure out if it's possible to filter a given field based on the character length of its value. This is for a clean-up project. In my case, I'm trying to find records where the "...
  • Jake_Raz's avatar
    11-07-2024

    Okay, nevermind, figured it out on my own after more experimentation 🙂

    For anyone else trying to do this: use a "Doesn't Contain" filter, and then chain the number of underscores for the number of characters you're looking for. This will show you with everything that has LESS than the number of underscores you specify. For instance, this is using six underscores in a row, meaning it returns any Matter Name that has 5 or less characters.

    If you want to reverse it, change the operator to "Contains". Then that would show you every Matter Name with at least six characters, or more.

    If you want to find items with an exact number of characters, then unfortunately the "equals" operator still doesn't seem to work correctly, but you can instead use two conditions: one "Not Contains" and the other "Contains". Just make sure you use AND logic, not OR. For example, here's how to filter down to items that are exactly three characters long.