Question

Build ESQ from SysProfileData.ObjectData

Hello,

I am looking to extract the sort field and sort order being used by a user on a section and implement this same sort condition into an EntitySchemaQuery so that it brings back data in the same order.

I see the information exists in the SysProfileData.ObjectData field. Are there any modules/libraries that can help simplify the extraction of the sort columns? In particular the use of a sort based on an aggregate field has a complex structure to it and seems difficult to translate to an ESQ condition.

 

Thanks in advance!

Like 0

Like

2 comments
Best reply

Hello,

 

Additional question: should it be a client-side or server-side logic? Because if this is a client-side logic then you need the same logic as in the initQuerySorting method from the GridUtilitiesV2 module in the UI that gets the sorting column and add adds it to client-side ESQ when loading the grid:

and use the same in your logic. If this is a server-side implementation this is more complicated, try debugging the ReadProfileData method from the CommonUtilities class that reads profile data.

Hello,

 

Additional question: should it be a client-side or server-side logic? Because if this is a client-side logic then you need the same logic as in the initQuerySorting method from the GridUtilitiesV2 module in the UI that gets the sorting column and add adds it to client-side ESQ when loading the grid:

and use the same in your logic. If this is a server-side implementation this is more complicated, try debugging the ReadProfileData method from the CommonUtilities class that reads profile data.

I am working on the client side, so this helps a lot. Thank you!

Show all comments