Hi there, we are noticing that Advanced Hilite Clauses are not displaying correctly in the Hilite Editor in 14.0+. If you go to this sample https://smartclient.com/smartclient-...finedHilitesFS and "Add Advanced Rule" and save, the field labels used in the Advanced rule are not displaying correctly. This works fine in Smartclient 12.1 so looks like a regression. See screenshot for how it appears...
Announcement
Collapse
No announcement yet.
X
-
Hi, thanks for the quick response. I tried the latest build and immediately saw a few errors when trying to load the hilite editor. I tried to patch those errors with the patch below and the window loaded but the advancedClauseLabels were still not displaying correctly unfortunately. I can see improvements but still not 100%.
if (isc.version.indexOf("v14.0") > -1) {
isc.FilterClause.getPrototype().addProperties({
getField : function isc_FilterClause_getField(_1) {
if (_1 == null)
return null;
if (isc.isAn.Object(_1))
return _1;
var _2;
if (_1 == this.$270l || _1 == this.$276r) {
var _3 = this.clause && this.clause.getValue("fieldQuery")
, _4 = this.getSubQueryOutputType(_3);
_2 = {
name: _1,
type: _4
}
} else if (this.dataSources) {
_2 = isc.DataSource.getFieldFromDataSources(_1, this.dataSources)
} else if (this.dataSource) {
_2 = this.getDataSource().getField(_1);
if (_2 == null) {
_2 = this.getDataSource().getFieldForDataPath(_1)
}
if (_2 == null) {
// 5/3/25, patch, need to check for existence of getTopLevelFilterBuilder()
var _5 = (this.getTopLevelFilterBuilder()!=null ?this.getTopLevelFilterBuilder().criteriaComponent:null);
if (_5)
_2 = _5.getFieldByName(_1)
}
} else {
if (this.clause) {
_2 = this.fieldData ? this.fieldData[_1] : null;
if (!_2)
_2 = this.clause.getField("fieldName").getSelectedRecord();
if (!_2)
_2 = this.field;
else
this.field = _2
}
}
if (!_2 && this.createRuleCriteria) {
var _6 = this.getTopLevelFilterBuilder().$167n
, _7 = _6.getRuleScopeDataBoundComponents()
, _8 = _1.split(".")
, _9 = (_8.length > 0 ? _8[0] : null)
, _10 = (_8.length > 1 ? _8[_8.length - 1] : null);
if (_9 && _10) {
for (var i = 0; i < _7.length; i++) {
var _12 = _7[i].getID();
if (_12 == _9) {
_2 = _7[i].getField(_10);
break
}
}
}
}
return _2
},
getTopLevelFilterBuilder : function isc_FilterClause_getTopLevelFilterBuilder() {
var _1 = this.filterBuilder;
// 5/3/25, patch, need to check for existence of _1 filterBuilder
while (_1 && _1.filterBuilder != null) {
_1 = _1.filterBuilder
}
return _1
}
})
}
Comment
-
hi Dave,
We aren't seeing any errors at the sample-link you shared, or in our FilterBuilder samples. Can you show sample code that shows an issue?Last edited by Isomorphic; Yesterday, 08:38.
Comment
-
Hi, here is how to recreate with your sample, open the dev console and make this call to update the hilites to something more complex including certain fields that aren't defined on the datasource and you will see the error. It must be something about the fieldName format like this: "customFieldAT-Research Stage"
With the patch I displayed earlier, it seems to work fine. I also noticed however that the hilite editor doesn't scroll to show a large number of hilite rules in our app or in your showcase. I've pasted another version of hilites below that will load properly without the error but which is missing a needed scroll bar.
Use this version to see the error regarding filterBuilder and getTopLevelFilterBuilder():
countryList.setHilites([{"icon":"","fieldName":["ompnt_percent_from_risk_adjusted_ops"],"backgroundColor":"#CCFFCC","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"ompnt_percent_from_risk_adjusted_ops","operator":"greaterThan","value":0},{"fieldName":"continent","operator":"equals","value":"Europe"},{"operator":"notBlank","fieldName":"ompnt_percent_from_risk_adjusted_ops"}]},"cssText":"background-color:#CCFFCC;","id":24,"disabled":false},{"icon":"","fieldName":["ompnt_percent_from_risk_adjusted_ops"],"backgroundColor":"#CCFFCC","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"ompnt_percent_from_risk_adjusted_ops","operator":"lessThan","value":0},{"operator":"notBlank","fieldName":"ompnt_percent_from_risk_adjusted_ops"},{"fieldName":"continent","operator":"equals","value":"Europe"}]},"cssText":"background-color:#CCFFCC;","id":26,"disabled":false},{"icon":"","fieldName":["ompnt_percent_from_risk_adjusted_ops"],"backgroundColor":"#FFBFBF","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"ompnt_percent_from_risk_adjusted_ops","operator":"lessThan","value":0},{"operator":"notBlank","fieldName":"ompnt_percent_from_risk_adjusted_ops"},{"fieldName":"continent","operator":"equals","value":"Europe"}]},"cssText":"background-color:#FFBFBF;","id":29,"disabled":false},{"icon":"","fieldName":["ompnt_percent_from_risk_adjusted_ops"],"backgroundColor":"#FFBFBF","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"ompnt_percent_from_risk_adjusted_ops","operator":"greaterThan","value":0},{"operator":"notBlank","fieldName":"ompnt_percent_from_risk_adjusted_ops"},{"fieldName":"continent","operator":"equals","value":"Europe"}]},"cssText":"background-color:#FFBFBF;","id":30,"disabled":false},{"icon":"","fieldName":["ompnt_percent_from_risk_adjusted_ops"],"backgroundColor":"#CCFFCC","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"ompnt_percent_from_risk_adjusted_ops","operator":"lessThan","value":0},{"operator":"notBlank","fieldName":"ompnt_percent_from_risk_adjusted_ops"},{"fieldName":"continent","operator":"equals","value":"Europe"}]},"cssText":"background-color:#CCFFCC;","id":31,"disabled":false},{"fieldName":"population","backgroundColor":"#99CC00","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"population","operator":"greaterOrEqual","value":10},{"operator":"iEquals","fieldName":"continent","value":"Europe"}]},"cssText":"background-color:#99CC00;","id":12,"disabled":true},{"fieldName":"population","backgroundColor":"#FF6600","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"population","operator":"lessOrEqual","value":-10},{"operator":"iEquals","fieldName":"continent","value":"Europe"}]},"cssText":"background-color:#FF6600;","id":13,"disabled":true},{"fieldName":"population","backgroundColor":"#FF6600","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"population","operator":"greaterOrEqual","value":10},{"operator":"iEquals","fieldName":"continent","value":"Europe"}]},"cssText":"background-color:#FF6600;","id":14,"disabled":true},{"fieldName":"population","backgroundColor":"#99CC00","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"population","operator":"lessThan","value":-10},{"operator":"iEquals","fieldName":"continent","value":"Europe"}]},"cssText":"background-color:#99CC00;","id":15,"disabled":true},{"fieldName":"priceTargetsInvalidIndicator","criteria":{"fieldName":"priceTargetsInvalidIndicator","operator":"equals","value":true,"_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FF0000;","backgroundColor":"#FF0000","id":16,"disabled":false},{"fieldName":"missingPriceIndicator","criteria":{"fieldName":"missingPriceIndicator","operator":"equals","value":true,"_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FF0000;","backgroundColor":"#FF0000","id":17,"disabled":false},{"fieldName":"missingDeltaIndicator","criteria":{"fieldName":"missingDeltaIndicator","operator":"equals","value":true,"_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FF0000;","backgroundColor":"#FF0000","id":18,"disabled":false},{"fieldName":"pwrPositionSizeMismatchIndicator","criteria":{"fieldName":"pwrPositionSizeMismatchIndicator","operator":"equals","value":true,"_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FF0000;","backgroundColor":"#FF0000","id":19,"disabled":false},{"fieldName":"splitIndicator","criteria":{"fieldName":"splitIndicator","operator":"equals","value":true,"_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FF0000;","backgroundColor":"#FF0000","id":20,"disabled":false},{"fieldName":"invalidMinMaxPositionSizeIndicator","criteria":{"fieldName":"invalidMinMaxPositionSizeIndicator","operator":"equals","value":true,"_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FF0000;","backgroundColor":"#FF0000","id":21,"disabled":false},{"fieldName":"invalidPreferredReturnIndicator","criteria":{"fieldName":"invalidPreferredReturnIndicator","operator":"equals","value":true,"_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FF0000;","backgroundColor":"#FF0000","id":22,"disabled":false},{"icon":"","fieldName":["customFormulaAT2593"],"backgroundColor":"#FFBFBF","criteria":{"_constructor":"AdvancedCriteria","operator":"or","criteria":[{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"customFormulaAT2593","operator":"lessThan","value":0},{"fieldName":"optionDeltaAdjustedExposure","operator":"greaterThan","value":0}]},{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"customFormulaAT2593","operator":"greaterThan","value":0},{"fieldName":"optionDeltaAdjustedExposure","operator":"lessThan","value":0}]}]},"cssText":"background-color:#FFBFBF;","id":25,"disabled":false},{"icon":"","backgroundColor":"#CCFFCC","criteria":{"_constructor":"AdvancedCriteria","operator":"or","criteria":[{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"customFormulaAT2593","operator":"greaterThan","value":0},{"fieldName":"optionDeltaAdjustedExposure","operator":"greaterThan","value":0}]},{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"customFormulaAT2593","operator":"lessThan","value":0},{"fieldName":"optionDeltaAdjustedExposure","operator":"lessThan","value":0}]}]},"fieldName":["customFormulaAT2593"],"cssText":"background-color:#CCFFCC;","id":26,"disabled":false},{"icon":"","backgroundColor":"#CCFFCC","criteria":{"_constructor":"AdvancedCriteria","operator":"or","criteria":[{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"customFormulaAT2600","operator":"lessThan","value":0},{"fieldName":"optionDeltaAdjustedExposure","operator":"lessThan","value":0}]},{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"customFormulaAT2600","operator":"greaterThan","value":0},{"fieldName":"optionDeltaAdjustedExposure","operator":"greaterThan","value":0}]}]},"fieldName":["customFormulaAT2600"],"cssText":"background-color:#CCFFCC;","id":27,"disabled":false},{"icon":"","fieldName":["customFormulaAT2600"],"backgroundColor":"#FFBFBF","criteria":{"_constructor":"AdvancedCriteria","operator":"or","criteria":[{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"customFormulaAT2600","operator":"lessThan","value":0},{"fieldName":"optionDeltaAdjustedExposure","operator":"greaterThan","value":0}]},{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"customFormulaAT2600","operator":"greaterThan","value":0},{"fieldName":"optionDeltaAdjustedExposure","operator":"lessThan","value":0}]}]},"cssText":"background-color:#FFBFBF;","id":28,"disabled":false},{"fieldName":"customFieldAT-Beta Group","criteria":{"fieldName":"customFieldAT-Beta Group","operator":"equals","value":"B","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FFBFBF;","backgroundColor":"#FFBFBF","id":32,"disabled":false},{"fieldName":"customFieldAT-Beta Group","criteria":{"fieldName":"customFieldAT-Beta Group","operator":"equals","value":"N","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FFFFBF;","backgroundColor":"#FFFFBF","id":33,"disabled":false},{"fieldName":"customFieldAT-Beta Group","criteria":{"fieldName":"customFieldAT-Beta Group","operator":"equals","value":"G","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#CCFFCC;","backgroundColor":"#CCFFCC","id":34,"disabled":false},{"fieldName":"customFieldAT-Competitive Moat","criteria":{"fieldName":"customFieldAT-Competitive Moat","operator":"equals","value":"B","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FFBFBF;","backgroundColor":"#FFBFBF","id":35,"disabled":false},{"fieldName":"customFieldAT-Competitive Moat","criteria":{"fieldName":"customFieldAT-Competitive Moat","operator":"equals","value":"N","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FFFFBF;","backgroundColor":"#FFFFBF","id":36,"disabled":false},{"fieldName":"customFieldAT-Competitive Moat","criteria":{"fieldName":"customFieldAT-Competitive Moat","operator":"equals","value":"G","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#CCFFCC;","backgroundColor":"#CCFFCC","id":37,"disabled":false},{"fieldName":"customFieldAT-Conviction Level","criteria":{"fieldName":"customFieldAT-Conviction Level","operator":"equals","value":"B","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FFBFBF;","backgroundColor":"#FFBFBF","id":38,"disabled":false},{"fieldName":"customFieldAT-Conviction Level","criteria":{"fieldName":"customFieldAT-Conviction Level","operator":"equals","value":"N","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FFFFBF;","backgroundColor":"#FFFFBF","id":39,"disabled":false},{"fieldName":"customFieldAT-Conviction Level","criteria":{"fieldName":"customFieldAT-Conviction Level","operator":"equals","value":"G","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#CCFFCC;","backgroundColor":"#CCFFCC","id":40,"disabled":false},{"fieldName":"customFieldAT-Research Stage","criteria":{"fieldName":"customFieldAT-Research Stage","operator":"equals","value":"B","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FFBFBF;","backgroundColor":"#FFBFBF","id":47,"disabled":false},{"fieldName":"customFieldAT-Research Stage","criteria":{"fieldName":"customFieldAT-Research Stage","operator":"equals","value":"N","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#FFFFBF;","backgroundColor":"#FFFFBF","id":48,"disabled":false},{"fieldName":"customFieldAT-Research Stage","criteria":{"fieldName":"customFieldAT-Research Stage","operator":"equals","value":"G","_constructor":"AdvancedCriteria"},"icon":"","cssText":"background-color:#CCFFCC;","backgroundColor":"#CCFFCC","id":49,"disabled":false}]
)
Use this version to load the hiliteEditor and observe the need for a scrollbar that is missing:
countryList.setHilites([{"icon":"","fieldName":["ompnt_percent_from_risk_adjusted_ops"],"backgroundColor":"#CCFFCC","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"ompnt_percent_from_risk_adjusted_ops","operator":"greaterThan","value":0},{"fieldName":"continent","operator":"equals","value":"Europe"},{"operator":"notBlank","fieldName":"ompnt_percent_from_risk_adjusted_ops"}]},"cssText":"background-color:#CCFFCC;","id":24,"disabled":false},{"icon":"","fieldName":["ompnt_percent_from_risk_adjusted_ops"],"backgroundColor":"#CCFFCC","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"ompnt_percent_from_risk_adjusted_ops","operator":"lessThan","value":0},{"operator":"notBlank","fieldName":"ompnt_percent_from_risk_adjusted_ops"},{"fieldName":"continent","operator":"equals","value":"Europe"}]},"cssText":"background-color:#CCFFCC;","id":26,"disabled":false},{"icon":"","fieldName":["ompnt_percent_from_risk_adjusted_ops"],"backgroundColor":"#FFBFBF","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"ompnt_percent_from_risk_adjusted_ops","operator":"lessThan","value":0},{"operator":"notBlank","fieldName":"ompnt_percent_from_risk_adjusted_ops"},{"fieldName":"continent","operator":"equals","value":"Europe"}]},"cssText":"background-color:#FFBFBF;","id":29,"disabled":false},{"icon":"","fieldName":["ompnt_percent_from_risk_adjusted_ops"],"backgroundColor":"#FFBFBF","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"ompnt_percent_from_risk_adjusted_ops","operator":"greaterThan","value":0},{"operator":"notBlank","fieldName":"ompnt_percent_from_risk_adjusted_ops"},{"fieldName":"continent","operator":"equals","value":"Europe"}]},"cssText":"background-color:#FFBFBF;","id":30,"disabled":false},{"icon":"","fieldName":["ompnt_percent_from_risk_adjusted_ops"],"backgroundColor":"#CCFFCC","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"ompnt_percent_from_risk_adjusted_ops","operator":"lessThan","value":0},{"operator":"notBlank","fieldName":"ompnt_percent_from_risk_adjusted_ops"},{"fieldName":"continent","operator":"equals","value":"Europe"}]},"cssText":"background-color:#CCFFCC;","id":31,"disabled":false},{"fieldName":"population","backgroundColor":"#99CC00","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"population","operator":"greaterOrEqual","value":10},{"operator":"iEquals","fieldName":"continent","value":"Europe"}]},"cssText":"background-color:#99CC00;","id":12,"disabled":true},{"fieldName":"population","backgroundColor":"#FF6600","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"population","operator":"lessOrEqual","value":-10},{"operator":"iEquals","fieldName":"continent","value":"Europe"}]},"cssText":"background-color:#FF6600;","id":13,"disabled":true},{"fieldName":"population","backgroundColor":"#FF6600","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"population","operator":"greaterOrEqual","value":10},{"operator":"iEquals","fieldName":"continent","value":"Europe"}]},"cssText":"background-color:#FF6600;","id":14,"disabled":true},{"fieldName":"population","backgroundColor":"#99CC00","criteria":{"_constructor":"AdvancedCriteria","operator":"and","criteria":[{"fieldName":"population","operator":"lessThan","value":-10},{"operator":"iEquals","fieldName":"continent","value":"Europe"}]},"cssText":"background-color:#99CC00;","id":15,"disabled":true}]
)
Comment
Comment