Solved

Working around the lack of a "Does NOT Contain" List View Filter

  • 28 December 2018
  • 3 replies
  • 7 views

Dear Fellow K2 Developers,

 

What seemed like a simple operation has turned into a bit of a mind-numbing mess. I have a List View of user accounts. These accounts are a blend of external users and domain users. I want to be able to filter that list to only show acounts whose email addresses do not contain our company URL. (so any user with an email from a public domain)

 

In the filter settings for a list view I have the option to filter by addresses that contain a certain string, but not to filter by addresses that do NOT contain a certain string.

 

I have spent the past day messing with expressions and rules to try and find a workaround... But am having no luck.

 

Has anyone else come upon this problem? Any help is greatly appreciated!

 

Best regards,

~ Andrew

icon

Best answer by Nik 31 December 2018, 17:34

Can you add a column in your SmartObject to store Domain part of each email address?  If so, you can create an Expression to strip and store Domain part in that column then use Filter in List View to set Domain Not Equals your domain such as Denallix.com.

View original

3 replies

Where is your data stored?  If it is stored in a database you could build a view that returns the list based on a SQL query that excludes company email domains.

Userlevel 2
Badge +6

Can you add a column in your SmartObject to store Domain part of each email address?  If so, you can create an Expression to strip and store Domain part in that column then use Filter in List View to set Domain Not Equals your domain such as Denallix.com.

Thank you for the reply Nik,

 

I was able to use your suggestion to get this working correctly! Thank you!

 

~ Andrew

Reply