How can I filter Resource Assignments in the Project JSOM API

Copper Contributor

I can't seem to find a way to filter resource assignments when you read them from the resource (ie. using EnterpriseResource.get_assigments() using the Project JSOM API (PS.js) from a Sharepoint addin installed into the PWA site.

In this case, I want show all future assignments for this resource and not have to troll through hundreds of old ones.

With other lists, I appear to be able to say .get_list() and then use a CAML query to apply a filter. But there's no get_list equivalent for the DraftAssignmentCollection returned from get_assignments()

Is there any way to filter this list? Or is there an easy way to call the REST API from a session that is already using the PS.js or SP.js libraries?

I'm surprised there's no simple way of injecting CAML into the 'load' functions via the 2nd parameter - but then again the second parameter to the load functions documented anywhere. I'm quite unimpressed with the over-all quality of the documentation so far.

0 Replies