Forum Discussion

Jake_Raz's avatar
09-26-2024
Solved

Filter for values that contain line breaks

I'm trying to find records that contain a line break when they shouldn't. The field I'm trying to filter is a text field. How can I do this? To be clear, I'm trying to do this purely in the front-end...
  • Jake_Raz's avatar
    09-26-2024

    Welp, nevermind...right after posting this, I figured it out on my own. Sheesh.

    Well, I guess for anyone else who's come to this post via the search and are trying to do the same thing, here's what I did:

    1. Add the filter to the widget for the field in question
    2. Select the Text tab. Make sure the dropdown is set to Contains logic, then type "\n" in the input box.
    3. Switch to the Advanced tab. You should see the following: "contains": "\\n"
    4. Remove the second slash from within the second set of quotes, so you end up with this: "contains": "\n"
    5. Click OK

    This should filter down to only the records where the field contains a line break. You can verify this by including some other filter that makes it so your result set has both records with a line break and records without one, then toggle the first filter on-and-off. You'll see the no-line-break records get filtered out appropriately whenever the filter is active.