Workfront sort nested fields

361 Views Asked by At

I am trying to sort a collection of tasks from an individual project.

My api call /project?id=idabc123&fields=tasks:name,tasks:taskNumber&tasks:taskNumber_Sort=asc does nothing.

I know I can call tasks by project id and then the taskNumber sort then works (/task/search?projectID=idabc123&fields=name,taskNumber&taskNumber_Sort=asc). However I am trying to avoid two separate api calls.

Any ideas? Am I missing something syntax wise? The api call doesn't fail it just doesn't sort.

2

There are 2 best solutions below

1
On BEST ANSWER

It is not possible to sort by a collection. You can sort based on References or Fields but not collections.

1
On

The proper sort syntax is taskNumber_1_Sort=asc. To sort by a second dimension you would use somethingElse_2_Sort=asc. From what I can tell, sort isn't covered in the API docs so this isn't something that would be immediately obvious.