Question

Filter.On error on FilterGroup.AddItem

Hello,



I am experiencing problem when adding filter to filtergroup via add addItem.

Error states, filter.on is not a function.



Here's the esq:

const esq = Ext.create("Terrasoft.EntitySchemaQuery", {
	rootSchemaName: entitySchemaName
});
esq.addMacrosColumn(Terrasoft.QueryMacrosType.PRIMARY_COLUMN, "value");
esq.addMacrosColumn(Terrasoft.QueryMacrosType.PRIMARY_DISPLAY_COLUMN, "displayValue");
if (filterRules) {
	const filterDataFilters = Terrasoft.deserialize(filterRules);
	var filterGroup = new this.Terrasoft.createFilterGroup();
	filterGroup.logicalOperation = this.Terrasoft.LogicalOperatorType.AND;
	filterGroup.addItem(filterDataFilters); // <-- error filter.on is not a function
	esq.filters.addItem(filterGroup);
}

Here's the filter, which I saved in DB:

'{"items":{"59552fe0-df1d-41fc-b4c8-0e24dc86254e":{"filterType":1,"comparisonType":12,"isEnabled":true,"trimDateTimeParameterToDate":false,"leftExpression":{"expressionType":0,"columnPath":"Title"},"rightExpression":{"expressionType":2,"parameter":{"dataValueType":1,"value":"test"}}},"c3e0782f-a3f2-4e21-ad86-88801d5085ac":{"filterType":2,"comparisonType":2,"isEnabled":true,"trimDateTimeParameterToDate":false,"leftExpression":{"expressionType":0,"columnPath":"Account"},"isNull":false}},"logicalOperation":0,"isEnabled":true,"filterType":6,"rootSchemaName":"Opportunity"}'

Here's the error message:

 

Anyone have any idea about this problem?



Regards,

Lem

Like 0

Like

1 comments
Best reply

Silly me!



I already fixed it, my json is missing way more data than required.

Silly me!



I already fixed it, my json is missing way more data than required.

Show all comments