My environment is as follows -
Drupal 6.22
Services 6.x-3.1
Services Views 6.x-1.x dev

I am using the services views module to fetch some views, working fine with views containing all Drupal DB fields.
If I add custom columns (using PHP code) in the view result set, the service views module does not return these.

If the view is run on Drupal, the computed columns are seen in the result set; but the service views API does not seem to return these computed column.
I tried searching through the issues to see if anybody has logged this before. No luck.

Has anybody experienced this behavior ?
Can someone help here ?

Thanks in advance,
-Sudhanwa

Comments

sudhanwa’s picture

Has anybody come across this issue before ?

sumitk’s picture

Try to return views php field data as single variable OR json string else it will not show up in results. For example if you are trying to output an array return json_encode($array);

Chetan Sharma’s picture

Issue summary: View changes

After using the json_encode for array, i am not getting any output from the custom php field.
Please suggest me a different answer for the output in service view.

Sumeet Darade’s picture

Any Lead ? Facing the same issue !
After json_encoding the result it still prints in result set but is not returned by the rest server !

Help is appreciated !

pankaj01’s picture

Did anyone get this solved?