Documentation > CMS Template API Library > FilterParams > Add(String,Comparison,List[String],Boolean)
Add
Adds a filter which checks a list for the presence of a field.
public System.Void Add(String,Comparison,List[String],Boolean)
Parameters
Name | Description | Type |
---|---|---|
name | The name of the field to compare. | System.String |
comparisonOperator | The comparison operator. Must be IsInSet or NotInSet. | CrownPeak.CMSAPI.Comparison |
set | The set. | List<String> |
checkLists | Optional: Set to true if the field might be stored in an array (on a repeating panel). | System.Boolean |
Code Example
C#
Sample:
FilterParams filter = new FilterParams(); filter.Add("foo", Comparison.IsInSet, Util.MakeList("value1", "value2"));