# Empty Alert Message

**URL:** <https://community.thunkable.com/t/empty-alert-message/2185296>\
**Category:** Questions about Thunkable X\
**Tags:** solved\
**Created:** [December 19, 2022, 3:44pm UTC](https://community.thunkable.com/t/empty-alert-message/2185296 "2022-12-19T15:44:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoors](https://avatars.discourse-cdn.com/v4/letter/h/f14d63/32.png) [@hoors](https://community.thunkable.com/u/hoors)\
**Post date:** [December 19, 2022, 3:44pm UTC](https://community.thunkable.com/t/empty-alert-message/2185296/1 "2022-12-19T15:44:21Z")

</div>

Hello, my students are working on a quotes feature. When the quote button is clicked, an alert shows up with one of the quotes in the list. The issue is the alert message always shows up as empty at first and then it shows a random quote after the second click.

I have tried solutions such as adding a 0.1 second delaying, setting the alert messages before showing them, adding a message to the invisible component but nothing has worked yet.

 ![quotes](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/5/f5cc689c9def61b19943b621b3b808bd946699df.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 19, 2022, 4:37pm UTC](https://community.thunkable.com/t/empty-alert-message/2185296/2 "2022-12-19T16:37:20Z")

</div>

What’s happening is that the alert message completes its function before the set/random function is called.

The “then do” section of a function always runs _after_ the function is completed.

So you need to assign a variable’s value to the randomizer first and then call the alert function to display the variable.

The order of your blocks should be:

1. Set variable to random message
2. Set alert message to variable
3. Show alert

And actually, you don’t technically need a variable here. You can simply just move the green block above the purple one.

---

<div class="post-metadata">

**Author:** ![hoors](https://avatars.discourse-cdn.com/v4/letter/h/f14d63/32.png) [@hoors](https://community.thunkable.com/u/hoors)\
**Post date:** [December 19, 2022, 4:53pm UTC](https://community.thunkable.com/t/empty-alert-message/2185296/3 "2022-12-19T16:53:11Z")

</div>

That solution worked, thank you! Oddly enough when I tried it earlier it wasn’t working, maybe it was the mobile app’s response time to the changes in the blocks.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 19, 2022, 5:26pm UTC](https://community.thunkable.com/t/empty-alert-message/2185296/4 "2022-12-19T17:26:38Z")

</div>

Yes, Thunkable Live can cache a project and not display the current version. It’s unnerving and the cause of much wasted time for me.

I haven’t yet found a reliable way to determine if I’m seeing the current project version except for making an obvious change like altering a label’s text.

@conroy33 is there something you all do in-house to verify that a live test on Thunkable Live is **not** cached?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [March 19, 2023, 5:26pm UTC](https://community.thunkable.com/t/empty-alert-message/2185296/5 "2023-03-19T17:26:42Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
