As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
How a query can stay on the "onSuccess" until data is obtained
a
agustinap24
started a topic
over 9 years ago
while running a query on the kinvey database I need to stay at the "onSuccess" until it returns the values I need, and then continue running.
At the momento while the query is running start running the next method without the results it needs from the last query.
Thanks for your help!
1 Comment
E
Edward
said
over 9 years ago
Hey,
The idea is that requests are executed asynchronously in the background -- since we don't know how long they will take, we let them take as long as they need. Once a request has completed, onSuccess (or onFailure) will be called.
What you can do is move your code that you need to wait on right into the OnSuccess block. So once the query finally completes (which might take a while with a poor network connection!), the code within onSuccess will be called. From there, you will know that the query has finished.
agustinap24
At the momento while the query is running start running the next method without the results it needs from the last query.
Thanks for your help!