First off thanks for a great module!

But I cant seem to group a view fields and also hidden fields and field rewrites does not seam to work correct.
Any update on this matter would be great.

Comments

ygerasimov’s picture

Status: Active » Postponed (maintainer needs more info)

Yes, field rewriting won't work as it happens during rendering and we pass the data to services earlier. You can use field created with views_php to create altered values of your fields.

Excluded fields should not be shown in a view and I checked it works.

For the grouping I am not sure what the problem is. Could you provide example that does not work for you?

Strutsagget’s picture

Hi again.

If i group on title field within format settings nothing happens. But if i do that on a normal view i makes it a group with sub elements. But i guess its the same as with rewrites.

What i like to do is for example.

nodes{
node{
id: ""
title: ""
team_group{
name :""
members: ""
}
node{
id: ""
title: ""
team_group{
name :""
members: ""
}
}
}

ygerasimov’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Category: bug » support
Status: Postponed (maintainer needs more info) » Active

I have added hook_services_views_execute_view_alter (see services_views.api.php file for details) to alter results that has access to the view object. I think you can use this hook in order to group your results manually. Will this do the job?

Strutsagget’s picture

Hi!

Thx I will make a try.

scotthooker’s picture

I'm using http://underscorejs.org which helps me group the json etc...