This is always an interesting one. I recently wrote an API abstraction
that lets me do the following types of queries on ICP:
// receives all recipients on that icp port
Visitor.findAll
// recives a single recipient by id
Visitor.find("whateverid")
// recives multiple recipients by id
Visitor.find("whatever" :: "another" :: Nil)
// get a range of recipients on a zero-index array
Visitor.find(4,8)
// create new recipient and set declarative ador values
new Visitor().someAdor("VALUE").another_ador("value").save
OK, so what does this mean? Well, it means that its possible to write
all manner of cool abstractions on ICP and do quite a lot more than is
possible through the default uCreate XM tooling (which I find to be
restrictive) - ICP can be fairly flexible given enough knowledge about
what it can and cant do. My advice would be to call the service
directly and do (as bill suggests) a range-all call then manipulate
the result with code - functionally speaking, what you want can be
done fairly easily.
You could write an abstraction, as I have, and achieve all manner of
cool things. To give you an idea, what you could do using my version
would be:
// extra credit for those recognising the lambda expression!
Visitor.findAll.flatMap(visitor => bind(
// ... binding goes here ...
))
Cheers, Tim