Hy,
Starting from Feature Explorer:
http://localhost:8080/isomorphic/system/reference/SmartClient_Explorer.html#filterBuilderBracket
Here is my code:
var advancedCriteria = {
_constructor:"AdvancedCriteria",
operator:"and",
criteria:[
// this is a Criterion
{ fieldName:"population", operator:"lessThan", value:"8000000" },
{ operator:"or", criteria:[
{ fieldName:"continent", operator:"contains", value:"America" },
{ fieldName:"continent", operator:"contains", value:"Europe" }
]
}
]
}
isc.FilterBuilder.create({
ID:"advancedFilter",
dataSource:"worldDS",
criteria:advancedCriteria
});
isc.ListGrid.create({
ID: "countryList",
width:550, height:224, alternateRecordStyles:true,
dataSource: worldDS,
fields:[
{name:"countryName"},
{name:"continent"},
{name:"member_g8"},
{name:"population", formatCellValue:"isc.Format.toUSString(value);"},
{name:"independence"}
],
autoFetchData: true
})
isc.IButton.create({
ID:"filterButton",
title:"Filter",
click : function () {
countryList.filterData(advancedFilter.getCriteria());
}
})
isc.VStack.create({
membersMargin:10,
members:[ advancedFilter, filterButton, countryList ]
})
The problem is that “contains” operator it’s not get selected.
Here is the screenshot:

Other issues:
-
The “between” operator doesn’t seems to work either. I’ve tried it on the same example. here is a screenshot:

-
In the value fields from the filterBuilder I cannot use the left and right arrow to navigate through the inputfiled. Fore example( see the screenshot for between issue): In the condition “continent contains America” the inputField value obviously is “America”. Well if I want to go back and write “america” I have to either use the mouse to put the cursor in front of “A” or to delete the whole filed in order to get to the start.
Hope these are not “big” issues for you guys 'cause the whole 7.0 versions is very very impressive!
Hi John,
On your first problem, SmartClient is actually behaving correctly - though it is a little confusing. The values you see in the operator drop-down are descriptions drawn from the Operators class. The operator described as “contains” is actually called “iContains”. What makes this more confusing is that there actually is an operator called “contains” - it is described as “contains (match case)”. It isn’t selecting that one either, because “contains” is not on the list of operators marked as appropriate for text fields (though you can still use it - and any other operator - programmatically, it won’t appear in any lists that a user might see).
We’ve changed the AdvancedCriteria docs so that they refer to “iContains” rather than “contains” in the example - oh, and added that stray comma too. 
On your second issue - there was a bug, not in the AdvancedFilter system itself, which is comprehensively autotested as part of our release procedure, but in the FilterBuilder widget. We’ve fixed this now. It will be included as part of 7.0 final, or any interim beta we end up releasing.
On your final issue, we are indeed seeing the same broken behavior, though it seems to be a problem only in certain browsers. This one’s going to need looking into, we’ll get back to you.
Thanks for posting your findings,
Isomorphic Software Support
Hy guys,
I’ve tried to switch from contains to iContains and now I’m getting this Note:
"Error evaluationg your changes:
ErrorType: SyntaxError
ErrorMessage: Expected ‘;’ "
var advancedCriteria = {
_constructor:"AdvancedCriteria",
operator:"and",
criteria:[
// this is a Criterion
{ fieldName:"population", operator:"lessThan", value:"8000000" },
{ operator:"or", criteria:[
{ fieldName:"continent", operator:"iContains", value:"America" },
{ fieldName:"continent", operator:"iContains", value:"Europe" }
]
}
]
}
isc.FilterBuilder.create({
ID:"advancedFilter",
dataSource:"worldDS",
criteria:advancedCriteria
});
isc.ListGrid.create({
ID: "countryList",
width:550, height:224, alternateRecordStyles:true,
dataSource: worldDS,
fields:[
{name:"countryName"},
{name:"continent"},
{name:"member_g8"},
{name:"population", formatCellValue:"isc.Format.toUSString(value);"},
{name:"independence"}
],
autoFetchData: true
})
isc.IButton.create({
ID:"filterButton",
title:"Filter",
click : function () {
countryList.filterData(advancedFilter.getCriteria());
}
})
isc.VStack.create({
membersMargin:10,
members:[ advancedFilter, filterButton, countryList ]
})
Where do I go wrong?
Thanks in advance,
John
PS:Oh, and another tiny error: in the countryList ListGrid fields you have “member_g8” but in the worldDS is missing. 
Yupii,
on Evaluation Feature Explorer it’s working great 
the problem remains on LGPL version Feature Explorer.
I hope this is ONLY a Feature Explorer bug for LGPL version. 
Are you actually saying the same code isn’t evaluating property in your Feature Explorer in the LGPL build? That doesn’t make much sense, because you’re getting a syntax error..
I’ve downloaded again the LGPL version, cleared all my cache … the mysterious syntax error disappeared :))
Now I know why:
When I tried with iContains I copied the code from my prev post and modified it. In that code there is a comment “// this is a Criterion”. When I paste in the Feature Explorer the code was examined as a single line … so actually everything that was after the comment was lost. :))