Expand my Community achievements bar.

The next phase for Workfront Community ideas is coming soon. Learn all about it in our blog!

Tips on using "ciin" conditional modifier in filter text mode

Avatar

Level 3

Hello, I have a task report with a set of filters in text mode. I am trying to filter only tasks where the project-level custom field, "Factory 1 Country" is one of the 10 options listed in the code below. This field is setup as a text field. Rather than create individual OR instances to account for each of the 10 different entries I am filtering for, I thought I could use the "ciin" conditional modifier. However, this is not working.

Any insight on why this isn't working? Is it because the field is setup as a text field?

DE:project:Factory 1 Country=Mexico,Thailand,Italy,Korea,Pakistan,Malaysia,Other,USA,United States,India

DE:project:Factory 1 Country_Mod=ciin

name=Get Factory Samples to China Lab

name_Mod=cicontains

project:name=Jack

project:name_Mod=cinotcontains

project:status=CUR

project:status_Mod=in

status=NEW INP

status_Mod=in

14 Replies

Avatar

Level 10

Interesting... I have been playing around and I cannot get "ciin" to work at all. I've gotten "in" to work, but not "ciin".

Avatar

Level 3

So I got "in" to work with the comma separated values, but I would really love the case insensitive version...

Avatar

Level 10

Hi Hrug and Anthony,

Just a hunch, but replacing the commas with tabs might allow the ciin to work (tab delimited list vs on,long,term,despite,the,commas).

But if not (and perhaps either way), cin and ciin ought to work consistently, so I suggest you raise a support ticket.

Regards,

Doug

Avatar

Level 3

Thank you Doug! The tab instead of a comma worked!

Now this got me thinking; what I would rather do with this report is use the "cinotin" conditional modifier with a shorter list of variables. This also worked using the TAB spacing you recommended! However, the report now brings in blanks. Any way to combine a list of variables in "cinotin" along with filtering out blanks?

Avatar

Level 10

Fabulous Hrug: I'm glad the tab delimiter did the trick!

Although conceptually using cinotin in one clause of the filter with an AND Not Null in another clause should work (e.g. Not In a, b, c AND Not Null) might work, for easier maintenance (and more predictable results, as I'm suspicious that the AND might not Work As Advertised) I'd suggest you instead consider making the field required with a default value (e.g. TBD) that you could then simply add to the cinotin tab delimited list.

Regards,

Doug

Avatar

Level 3

No, that didn't work. :(

Unable to get the code to save when I add two different filters for the same field in the same AND statement.

As a workaround, I created a calculated field to check if the "Factory 1 Country" field is blank and it will return "Blank". I added that one to the same AND statement and it's all gravy!

Thanks again for all the help.

Avatar

Level 10

Mbwahaha...nicely done, Hrug.

Syntax. So picky.

Regards,

Doug

Avatar

Community Advisor

Hrug, glad your workaround worked, but wondered what code you were using that didn't work.

I'm late to the party but just wanted to mention Galen Malick found a solution that worked wonderfully as shown in this old post:

https://one.workfront.com/s/question/0D50z00006Px3ZxCAJ/filter-not-blank-and-not-x

Code snippet for syntax

<field>_Mod=notblank

AND:1:<field>=<value>

AND:1:<field>_Mod=notin

[edited post to replace old link with new link]

Avatar

Employee

Thanks for the heads up Skye. I've fixed the Workfront One post to be formatted correctly.

Avatar

Community Advisor

oh, awesome. I will edit my previous post to remove the old link

Avatar

Level 3

Yas! Thank you.

This is cleaner and I can remove the custom calced field. Appreciate the community's help with this. I have now also been introduced to wf-pro.com so it's a double-whammy.

Avatar

Level 3

In case it helps anyone else, here is the code that I ended up with. This is a slightly different report than what I posted above, but same concept as discussed in this thread:

name=Test task name

name_Mod=cicontains

project:name=Jack

project:name_Mod=cinotcontains

project:status=CUR

project:status_Mod=in

referenceNumber=1539937

referenceNumber_Mod=ne

status=NEW INP

status_Mod=in

DE:project:Factory 1 Country=China Taiwan CH TW Vietnam Cambodia VT

DE:project:Factory 1 Country Blank=Blank

DE:project:Factory 1 Country Blank_Mod=cinotin

DE:project:Factory 1 Country_Mod=cinotin

OR:1:DE:project:Factory 1 Country=China Taiwan CH TW Vietnam Cambodia VT

OR:1:DE:project:Factory 1 Country Blank=Blank

OR:1:DE:project:Factory 1 Country Blank_Mod=cinotin

OR:1:DE:project:Factory 1 Country_Mod=cinotin

OR:1:name=Test task name

OR:1:name_Mod=cicontains

OR:1:project:status=CUR

OR:1:project:status_Mod=in

OR:1:projectID=5de6b1700086fa2e4053737a31187750 5de6b18a0087293ad2e4441d65d719b7

OR:1:projectID_Mod=notin

OR:1:status=NEW INP

OR:1:status_Mod=in

Avatar

Employee

Thank you for sharing what ultimately ended up solving your problem all summed up nicely. This is so helpful!

Avatar

Level 10

Oooh! Nice find, Skye; yes, that's the one I was referring to in my AND suggestion.

If it works in this case insensitive situation for you, Hrug, I agree that it would be an elegant (and maintainable) solution.

Regards,

Doug