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 UI, because we don't have access to the backend admin area (for configuring the e-cube). So any solution that involves modifying tables/columns is out 😞
Is there a way to filter for line breaks using the normal text filters in the front-end UI? I can't just hit the Enter key in the input box because it doesn't treat that as actual input itself. I tried putting things like "\n" but it seems to be interpreting that as a literal, rather than as a newline character. I read in Sisense's documentation that you can use the backslash as an escape character, but searching for "\\n" also doesn't seem to work.
Thoughts on how I can achieve this without e-cube modification? Perhaps there's a way to do it via an Advanced filter, or using some kind of widget/dashboard script?
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:- Add the filter to the widget for the field in question
- Select the Text tab. Make sure the dropdown is set to Contains logic, then type "\n" in the input box.
- Switch to the Advanced tab. You should see the following: "contains": "\\n"
- Remove the second slash from within the second set of quotes, so you end up with this: "contains": "\n"
- 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.