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!

PropertyCriteriaCollection

Vote:
 
Slik jeg har forstått det benytter metoden Global.EPDataFactory.FindPagesWithCriteria "OR" mellom kriteriene (criterias collection) og ikke "AND". Er det mulig å få den til å benytte "AND" isteden? Eksempel: PageDataCollection col = new PageDataCollection(); PropertyCriteriaCollection criterias = new PropertyCriteriaCollection(); PropertyCriteria criteria; criteria = new PropertyCriteria(); criteria.Name = "property1"; criteria.Type = PropertyDataType.String; criteria.Condition = CompareCondition.GreaterThan; criteria.Value = "test"; criterias.Add(criteria); criteria = new PropertyCriteria(); criteria.Name = "property2"; criteria.Type = PropertyDataType.Boolean; criteria.Condition = CompareCondition.Equal; criteria.Value = true.ToString(); criterias.Add(criteria); col.Add(Global.EPDataFactory.FindPagesWithCriteria(Configuration.StartPage, criterias)); Altså ønsker jeg å finnes sider der: property1 = "test" AND property2 = "true" Jeg vet det er mulig å løse dette med filter, men det er ikke det jeg er ute etter her..
#11990
Sep 12, 2003 15:38
Vote:
 
Det finns en Property på klassen PropertyCriteria som heter Required som gör det du vill. I detta fall vill du sätta required på båda dina PropertyCriterias.
#13500
Sep 12, 2003 16:03
* 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.