# Easily finding attributes from Ext.grid.GroupingView's xml calls

**URL:** <https://www.ruby-forum.com/t/easily-finding-attributes-from-ext-grid-groupingviews-xml-calls/151666>\
**Category:** Rails\
**Created:** [October 24, 2008, 6:23am UTC](https://www.ruby-forum.com/t/easily-finding-attributes-from-ext-grid-groupingviews-xml-calls/151666 "2008-10-24T06:23:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trib4lmaniac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@trib4lmaniac](https://www.ruby-forum.com/u/trib4lmaniac)\
**Post date:** [October 24, 2008, 6:23am UTC](https://www.ruby-forum.com/t/easily-finding-attributes-from-ext-grid-groupingviews-xml-calls/151666/1 "2008-10-24T06:23:33Z")

</div>

I have a ext.GroupingView grid that paginates, filters, and obviously  
groups.

The combination of these options is both awesome and beyond the scope  
of this discussion.

The problem is, the params request when a user wants a new set of  
results is something that bears no resemblance to the database schema.

I’ve ended up doing something like this:  
[http://pastebin.com/m7d998444](http://pastebin.com/m7d998444)

That looks like hell, I’m not sure it works, and I dread the idea of  
maintaining it.

Is there a better solution out there? For those not wanting to look at  
the horrors beyond that link, I need something to take a filter string  
with a value, an offset, a group key, a limit, a sort key with  
ASC|DESC, and turn it into a query that spits out an array of objects  
sorted first by group and then again by sort.

Thanks in advance -

Alex
