Are you calling this function on the client or on the server? If on the client: have you published and subscribed to the data (check the meteor-dev tools in your browser? Can you find the data you expect in Minimongo?)
When you call survey.hasCompleted on the server that should probably work. But when you call that same function on the client it will not get any data from Measures.find unless you published the data on the server and then subscribe to it on the client. Collections work differently on the client and on the server. On the server Measures.find will go to the MongoDB driver and execute db.getCollection("MeasureData").find. But we don’t have direct access to MongoDB on the client but instead we have something called Minimongo that behaves a lot like MongoDB and contains a copy of some of the data of the MongoDB - if that data has been published on the server and if you have subscribed to that publication. And my guess is, that you did not publish and subscribe.
But at least in the code you have shown here you pretty much only use the count of the cursor. So unless you need all the data (and reactively) you should not use pub/sub like this. You don’t want to synchronise all the data sets just to count them. Then you should use either a custom publication or probably even better use Meteor methods.
You should probably review Publications and Data Loading | Meteor Guide and Methods | Meteor Guide and then create a fresh Collection with Publications and Methods and a React Component to grab some data and keep it really, really simple. Data fetching in Meteor isn’t hard, but it’s different from Rest apis and when you are new to it you get confused quite easily. Most of us have been there. So take a little time to go back to very easy examples and when you get those down you will figure out the stuff you are working on. And get the Meteor dev tools for chrome. Especially Publications are much easier to grasp when can see what happens in Minimongo.
Blockquote I think using meteor methods sounds a good option for this case.
If you need only know the measurement status on client side, the method will be great for that. If you will need to have also the measurements data, publications will be probably better solutions.
You could then call Measures.hasCompled(someUserId) instead of Measures.find({'creatorDetails.uuid': someUserId, [...]}).count()
But on the client that will still yield 0 unless you take care of pub/sub yourself.
It just adds some methods to the wrappers that Meteor builds around MongoDB- and Minimongo- Collections.
There’s really no way past dealing with pub/sub or methods (unless you want to go with the autopublish and insecure packages, wich just take care of pub/sub for you by publishing everything to everyone, wich ist probably not what you want in most cases - totally fine for quick little apps you just want to run locally for just yourself, though).