Page 1 of 1

Filter on partial field value

Posted: Mon Mar 14, 2011 3:40 pm
by eclectus
Is it possible to filter based on sub-string in a field.

Case in point, we have a member-id field, and we want all members that have the last digit in their member number smaller than 5 (4,3,2,1,0). This is used to randomly split the member list into two groups, but ones that we can identify later so we can't use a 'random' function.

Re: Filter on partial field value

Posted: Mon Mar 14, 2011 7:54 pm
by ZevToledano
Possible methods:
-If it's a number, extract the last number only using the Mod function inside a custom function (<val> mod 10) and filter on this function.
-It it's a text field use the Right() function in a custom function to extract only the last letter.
-Use the 'Match' operand when adding a string filter to specify the exact pattern you are looking for. When you select Match, hover your mouse over the filter value area to get help.