FindPagesWithCriteria - PropertyDataType.String - Not null value

Vote:
 
Hi, How do I use the FindPagesWithCriteria to get pages that do have a value (ie not null) that is of 'string' type? It appears that the function is using the StringCompareMethod rather than the CompareCondition when the datatype is string. StringCompareMethod does not have a "NotIdentical" or something that can be used as a generic search for all pages that do have a value.
#13184
Mar 25, 2008 18:35
Vote:
 
A solution :) PropertyCriteriaCollection coll = new PropertyCriteriaCollection(); string alphabet = "abcdefghijklmnopqrstuvwxyzæøå123456789"; foreach (char c in alphabet.ToCharArray()) { PropertyCriteria crit = new PropertyCriteria(); crit.Name = "PageExternalURL"; crit.Value = c.ToString(); crit.IsNull = false; crit.Type = PropertyDataType.String; crit.StringCondition = EPiServer.Filters.StringCompareMethod.Contained; crit.Required = false; coll.Add(crit); }
#15510
Mar 25, 2008 18:47