can i order EntitySchemaQuery??

dear my friend

i create query with EntitySchemaQuery. can i order root schema with colomn on root schema

getModulePrintFormsESQ: function() {
			var entitySchemaName = this.getEntitySchemaName();
			var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
				rootSchema: SysModuleReport,
				isDistinct: true,
				rowViewModelClassName: "Terrasoft.BasePrintFormViewModel"
			});

thx before

Chairul Anwar

 

Like 0

Like

2 comments

Yes, you can.

Just push the result columns to the esq, and set sorting by specifying the index of the column and the sort order

var entitySchemaQuery = Ext.create("Terrasoft.EntitySchemaQuery", {
	rootSchemaName: entitySchemaName
});
 
var modifiedOnColumn = entitySchemaQuery.addColumn("ModifiedOn", "ModifiedOn");
 
modifiedOnColumn.orderPosition = 0;
modifiedOnColumn.orderDirection = Terrasoft.OrderDirection.ASC;

 

Anastasia Botezat,

thanks so much anastasia. i can order that page.

Show all comments