Multiple values in Custom filter tool
- 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
I am not sure how to put this in the custom filter
[CC]= "3430","3440","3820","382A","382S","3890","4070","407A","408A","4130","413A","4330","433A","4340","434A","434R","4481","4880"
I would like to include only these in the workflow . As we have different systems , instead of putting filter in each systems , after union i would like to put these as common filter .Also how many max values we can put in the custom filter .Pls help how this can be done in custom filter or is there any other ways to do this.
- Labels:
- Custom Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @sml1984,
Do you mean you want to allow any of the following values to pass through your filter? If so, try this expression:
[CC] IN ("3430", "3440", "3820", "382A", "382S", "3890", "4070", "407A", "408A", "4130", "413A", "4330", "433A", "4340", "434A", "434R", "4481", "4880")
IN is effectively an OR statement. There is no limit to the number of options (that I have experienced!) passed in the IN statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This works well when you put the exact value of the value you are wanting to filter...
But for example, say I want to filter on data that has values like " 1 - Asset" "2 - Liability" "3 - Equity" but I dont want to have to write out : [Account] IN ( " 1 - Asset", "2 - Liability", "3 - Equity") and I just want to be able to write: [Account] IN ("1", "2", "3").... that doesnt work because there is no value with just the "1". I have to write out the exact value.
Is there an alternative way of writing the formula to filter on the values with out having to write the whole thing. I know there is also the option to write Contains ([Account], "1") OR Contains ([Account], "2") etc... but thats still alot of typing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @jportello ,
How about this?
Left([Account], 1) IN ("1", "2", "3")
You can also use other string parsing functions like GetPart, Right, Substr, etc. Check out the functions page for more details!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Do you have these filter values in a list somewhere? Or are you just typing out what you want in the formula one by one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
regex_replace([Account],".*(\d+).*","$1")
@clmc9601 's way is easier - but wouldn't work if you have more than one digit potentially.
