Hi Everyone,
I have a requirement where I need to sort the grid on page load based on Priority . Eg.we have Critical, high and low priority. Critical priority cases will come at the top followed by high and low. I have given priority in initial sorts. In addition to that I have to sort with latest id on page load. So I have given both id and priority column in initial sorts so that it will sort on page load. This is working for the grid when the data source is coming from record. So the latest critical cases will come at the top since we have provided both id and priority in initial sorts.
I have another grid where the data source is from process report. There I could able to provide only one initial sort(either id or priority). It is not working as expected when I provided two initial sorts(i.e Id and priority).
Is there a way to provide multiple initial sorts for the grid where the data source is from process report. I need to sort both the columns on page load. Please help me to achieve this
Thanks
Discussion posts and replies are publicly visible
Like others have said, using a!queryProcessAnalytics can only use a single sort.
How much data do you have? If you have a small-ish number of values, it would be pretty easy to just query all the data and sort it after you query it. Here's an example:
a!localVariables( local!query: a!queryProcessAnalytics( report: cons!MY_TASKS_REPORT, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 1000 ) ) ), a!gridField( data: local!query.data, columns: { a!gridColumn( label: "Task Name", value: fv!row.c0 ), a!gridColumn( label: "Date Assigned", value: datetext(fv!row.c7, "yyyy-MM-dd h:mm:ss a") ) }, initialSorts: { a!sortInfo( field: "c0", ascending: true ), a!sortInfo( field: "c7" ) } ) )
Hi, we have large number of data from report and the values will be dynamically increasing going forward
Are you sure you need all the data at once? Could you either add static filters to limit the data, or even give dropdowns or something at the top of the page where the user could filter their data?
We have dropdown filters at the top of the grid to filter the data. But if no filters are applied the user will be able to see all the data.