London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

PropertyCriteria

Vote:
0
Hi! I need to filter pages that are not published and uses PropertyCriteria. As condition I found EPiServer.Filters.FilterPublished that sounded good but I can´t make it work. Some of the code: PropertyCriteria publishCrit = new PropertyCriteria(); publishCrit.Name = "PublishedStatus"; publishCrit.Type = PropertyDataType.Boolean; publishCrit.Condition = EPiServer.Filters.FilterPublished(); publishCrit.Value = true.ToString(); publishCrit.Required = true; criteriaCol.Add(publishCrit); Any suggestions?
#12295
Jun 10, 2005 9:03
Vote:
0
Have a look at this FAQ article: http://www.episerver.com/templates/faq.aspx?id=4852
#14007
Jul 04, 2005 10:25
Vote:
0
I nedd to do the same thing as above. But I have to use the boolean property beacuse it is an own defined property.
#14008
Jan 13, 2006 9:55
Vote:
0
The following works on a "selected/not selected" dynamic property. PropertyCriteria Crit = new PropertyCriteria(); Crit.Type = PropertyDataType.Boolean; Crit.Name = "DynamicPropertyName"; Crit.Value = "true"; Crit.Condition = EPiServer.Filters.CompareCondition.Equal;
#14009
Jan 14, 2006 15:09
Vote:
0
Thanks for the input. But when I set the value to "false" I can´t get any matches. The property is not a dynamic property. Am I doing something wrong, the only thing i change from your the example below is the value. /Niklas
#14010
Jan 16, 2006 11:35
Vote:
0
A Boolean property isn't saved in the database so it's hard to filter on a property that is not saved Maybe you can do your own filter that checks if "ourProperty" == null /snive
#14011
Jan 16, 2006 12:24
Vote:
0
Check the SDK. The FilterRemoveNullValues might work for you. EPiServer.Filters.FilterRemoveNullValues Class /HAXEN
#14012
Jan 17, 2006 11:21
* 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.