# How can I pause for the readRecords callback to finish before I try to use the data?

**URL:** <https://forum.code.org/t/how-can-i-pause-for-the-readrecords-callback-to-finish-before-i-try-to-use-the-data/35296>\
**Category:** Website and Tools Questions\
**Tags:** csd-unit-2\
**Created:** [October 19, 2021, 9:42pm UTC](https://forum.code.org/t/how-can-i-pause-for-the-readrecords-callback-to-finish-before-i-try-to-use-the-data/35296 "2021-10-19T21:42:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jdonwells](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jdonwells/32/7900_2.png) [@jdonwells](https://forum.code.org/u/jdonwells)\
**Post date:** [October 21, 2021, 3:31pm UTC](https://forum.code.org/t/how-can-i-pause-for-the-readrecords-callback-to-finish-before-i-try-to-use-the-data/35296/2 "2021-10-21T15:31:33Z")

</div>

You are struggling with event driven programming. You don’t wait; you call.

Look at this [Assigning value from getKeyValue to a variable](https://forum.code.org/t/assigning-value-from-getkeyvalue-to-a-variable/35251)

Very little in your program should reside outside of a function. It all chains from events that are set into motion by clicking on something.

---

_[View the full topic](https://forum.code.org/t/how-can-i-pause-for-the-readrecords-callback-to-finish-before-i-try-to-use-the-data/35296)._
