FilterBuilder Operator restriction

We have downloaded Smart Client 7.0 RC1 and tried the filter builder.

It displays following below values if the topOperatorAppearance: “radio” is set on the the filterbuilder.

$540and 	$540or  $540not

Here is the standalone test case from your example. I have added first two lines to restrict the operator for type text.


var operatorType = [“equals”,“iContains”];
worldDS.setTypeOperators(“text”,operatorType);

isc.FilterBuilder.create({
ID:“advancedFilter”,
dataSource:“worldDS”,
topOperatorAppearance: “radio”
});

isc.ListGrid.create({
ID: “countryList”,
width:550, height:224, alternateRecordStyles:true,
dataSource: worldDS,
fields:[
{name:“countryName”},
{name:“continent”},
{name:“population”, formatCellValue:“isc.Format.toUSString(value)”},
{name:“area”, formatCellValue:“isc.Format.toUSString(value)”},
{name:“gdp”, 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 ]
})


Let me know if we are doing something wrong here.

Thanks,
Alex Z

Please confirm if this is a bug in library itself or I am using it in a wrong way.

Hi, thanks for the test case, this has been queued up and someone will look into it shortly.

Hi AlexZ,

This problem is a side-effect, caused by you calling setTypeOperators() and not including any logical operators (“and”, “or”, “not”). We have changed this behavior for 7.0 final, so that setTypeOperators() automatically includes ALL the logical ops unless you specify a subset of them - so the default position is to allow all three, but you can specify that you only want to allow “and”, or just “and” and “not”, if you have a need to do that. We have also fixed FilterBuilder to resolve this label strangeness where operators are missing.

The workround is simply to add the three operators “and”, “or” and “not” to the list you pass to setTypeOperators(). This workround is forward-compatible and will continue to work with the 7.0 final code described above.

Regards,
Isomorphic Software Support