While creating a custom Point Group query using CustomPointGroupQuery class, when you call the SetQuery() function with your custom query string sometimes you may see the following exception message : Invalid value for property !
Most likely cause of this exception is improper query string formation. I will give you an example here.
If we build a StandardPointGroupQuery object, we can set a condition like the following and all works fine :
StandardPointGroupQuery standardPointGrpQry = new StandardPointGroupQuery();
standardPointGrpQry.IncludeNumbers = "550-560, 565-572";
However, when we build a CustomPointGroupQuery, and we try build a query string like the following :
CustomPointGroupQuery customPointGrpQry = new CustomPointGroupQuery();
string queryString = "(RawDescription='TO*') AND (PointNumber='600-1000')"; // Doesn't work
You would see the excpetion message - "Invalid value for property !" when you try to execute SetQuery(customPointGrpQry).
To include a range of Points, you need to build query string like the following :
CustomPointGroupQuery customPointGrpQry = new CustomPointGroupQuery();
string queryString = "(RawDescription='TO*') AND (PointNumber>=600 AND PointNumber<=1000) "; // this works
Hope this is useful to you !