Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

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
Aug 30, 2007 12:44
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
Aug 30, 2007 12:52
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.