Looking for fields that ONLY contain certain items
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi all --
I hope I am missing something, but I thought this would be easier. What I want to do is filter on a field if it contains only a particular set of strings. In other words, let's use the strings A, B, C -- case insensitive.
My data is in a single field, concatenated with a comma.
If I use an AND, it will bring back anything that at least matches the below string but could have other items. If I use an OR, it will match any of the items and return rows with other information as well.
A, B, C | Match |
A, B, C, D | No Match |
B,A,C | Match |
C,R,Q,A,B | No Match |
I'm sure I am missing something, so thank you for your help.
Regards,
Seth
- Labels:
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hi @smoskowitz
If you just want the filter to occur where the field is only a specific string, you might want to use "[field] = "A, B, C" " instead of using contains.
Are you able to attach a workflow with a sample input/output?
Cheers,
TheOC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @TheOC --
Thank you for the suggestion, but the problem is the order might be different and it won't actually be equal. The workflow is to big and complicated to share. I figured an unrelated way around it.
Have a nice day!
Regards,
Seth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I think there are a few ways to do this. What if you used a Data Cleanser to clean away all whitespace. punctuation, etc. so that you're left with only the letters. That would mean any cell containing A and B and C would be a length of exactly 3. Then your filter formula could be as follows:
Contains([Field1],"A") AND
contains([Field1],"B") AND
contains([Field1],"C") AND
Length([Field1])=3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hey @smoskowitz
Ahhhh i see! I didn't follow that part the first time reading, my apologies.
the solution from @mandycgray seems viable, glad you got it sorted.
Cheers,
TheOC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@smoskowitz
IMHO, the data of yours should be much complicated and hard coding may not be able to address that.
I am thinking a more dynamic way and tested it by adding one more test string.
if you can provide a sample of your real data, we can take a closer look.
