Grouping / sorting based on CSV data source keyword


(Peter Bridgfoot) #1

Is it possible to group and sort based on keywords from a datasource record set asset?


For example I have a csv with multiple columns. I want to be able to group by one column and sort by another.


(Anthony Barnes) #2

The CSV data source asset doesn't support an interface for sorting/grouping, but you could potentially import this CSV file as a database table then use the DB data source asset instead to achieve the grouping sorting (via SQL). If that isn't possible then perhaps the application of JavaScript on the output of the list to re-order the items.


(Greg Tankard) #3

So just to confirm this, you're saying we can't use an Asset List to group (or sort) data from a CSV record set using its keyword?


It seems to allow us to create the custom grouping in the asset list but it doesn't show the data grouped and I'm not seeing any errors coming through on either the front end or in the logs.


(Anthony Barnes) #4

I'm fairly certain you won't be able to use grouping, a developer may be able to confirm this. I would think due to the nature of the data record and it not being an actual asset that the asset listing wouldn't have enough information to drive the grouping. There's a chance I could be wrong so I'll see if I can get a more authoritative answer.


(Shane Weddell) #5

Hi Greg/Pete, it has been a while:)


The asset list sorting will work on a csv data record set but grouping wont as the options to group on are only parent, metadata and standard asset field. With sorting you would be able to get the records in the order you want by sorting on the first column and then the second. The issue will be that of display because you will only be able to rely on the type formats for what you display so if you put the value of the first column in to the format you will get it for every entry, this is where JS might come in handy or you might be able to live with it. You set up the sorting by adding the keywords from the csv datasource into the Sorting by Asset Keyword Value section in the sorting screen.



Hope this helps.



Shane


(Peter Bridgfoot) #6

Thanks for the advice.


I've discovered one way of grouping. I used the keyword I wanted to group by as the shadow asset name. I then grouped by asset name.


(Shane Weddell) #7

oooh, that is sneaky, I love it :slight_smile:


(Joel Porgand) #8

I've discovered one way of grouping. I used the keyword I wanted to group by as the shadow asset name. I then grouped by asset name.

 

Somewhat of a grave-dig, but has anything changed/is anything likely to change in the way asset listing groups work with data source record sets? This method seems to work well enough but it feels like a bit of a kludge.


(Pomster09) #9

Hi Bridgy,

 

I had a similar issue a while back where I needed to sort and filter shadow assets. I cracked it pretty easily by using google charts, and using asset listing to output json data. The end result for me was a table I could filter using two binded select boxes. I know with these charts you can also add a search field and have that binded to other fields. Check out: http://forums.squizsuite.net/index.php?showtopic=10399&hl=wardie#entry47486


(Niraj Sachania) #10

Also looking to group datasource record sets, need 2 grouping levels so the asset-name trick isn't enough.. quite disappointed with the CMS on a number of things relative to the costs.. having to do workarounds and JS solutions for what should be basic built in features.


(Nic Hubbard) #11

Also looking to group datasource record sets, need 2 grouping levels so the asset-name trick isn't enough.. quite disappointed with the CMS on a number of things relative to the costs.. having to do workarounds and JS solutions for what should be basic built in features.

 

What things do you think it is missing?