# Adding new alerts in my alert that is working at the moment

**URL:** https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800
**Category:** Questions about Thunkable X
**Tags:** alert
**Created:** [June 1, 2023, 12:44pm UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800 "2023-06-01T12:44:16Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![hendrikbez](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@hendrikbez](https://community.thunkable.com/u/hendrikbez)
#### Post date: [June 1, 2023, 12:44pm UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/1 "2023-06-01T12:44:16Z")

</div>

I want to add extra alerts to already alerts, did get this data, most of them is working, but there are two lines I do not understand. Do have all thevariable names already. the two lines in bold, i can not figure them out.

when Button\_submit Click  
do  
set alert2’s message to [test]  
set alert2’s title to [used]  
**set app variable totaalbeskikbaar to (totaalbeskikbaar + currentBeskikbaar)**  
**set gebruikValue to (app variable totaalbeskikbaar as number) - (currentBeskikbaar as number)**  
call alert2’s show  
with alert2’s output  
if confirmed  
do  
create row in krag-eenhede in eenhede  
id value [" “]  
Datum value [call inpDatum’s get date]  
Beskikbaar value [currentBeskikbaar] // Use the stored currentBeskikbaar value  
Bebruik value [gebruikValue] // Use the calculated Gebruik value  
Bedrag value [” “]  
Ontvang value [” “]  
Koste value [” “]  
Beskikbaarshjow value [” “]  
set inpBeskikbaar’s text to [” "]  
set alert2’s message to "Total Beskikbaar: " + app variable totaalbeskikbaar + "\nGebruik: " + gebruikValue

---

<div class="post-metadata">

### Author: ![hendrikbez](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@hendrikbez](https://community.thunkable.com/u/hendrikbez)
#### Post date: [June 2, 2023, 5:11pm UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/2 "2023-06-02T17:11:03Z")

</div>

Ok, I hasve done a few changes, but arte realy now stuck. I need the message to show the followint (it is in my blocks) Title (Beskikbaar) and message (that should show the amount I have put in Beskikbaar and then the vlaue of Gebruik) befroe I press ok or cancel button.

This is my blocks and this is the message I need “Maak seker dat jy die regte Datum en Beskikbaar totaal ingevoeg het” + "\nTotal Beskikbaar: " + app variable totaalbeskikbaar + "\nGebruik: " + app variable gebruikvalue

 ![Screenshot_40](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/a/4a72ee9cbf13ad8587e0394de7c277444219395e.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: [June 2, 2023, 5:42pm UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/3 "2023-06-02T17:42:51Z")

</div>

Put the Alert Show block inside the “do” section of the Create Row block above it.

---

<div class="post-metadata">

### Author: ![hendrikbez](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@hendrikbez](https://community.thunkable.com/u/hendrikbez)
#### Post date: [June 3, 2023, 3:18am UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/4 "2023-06-03T03:18:47Z")

</div>

Did do it, but stil gedt the error

 ![Screenshot_42](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/6/065124ed97d4f2196a8716679a3cdb35950e4017.png)  
 ![Screenshot_41](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/d/0d8f14400855c65ab9f8e2f1436c93dd45527e18.png)

I did try it like this also, but still same error

 ![Screenshot_43](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/9/49b787468f756e5d5fb61f3d29cb7f3a770e40f1.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: [June 3, 2023, 6:18am UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/5 "2023-06-03T06:18:44Z")

</div>

You can’t just write “+ app variable” in a text string and expect that to work. You have to use the Join block from the Text drawer.

---

<div class="post-metadata">

### Author: ![hendrikbez](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@hendrikbez](https://community.thunkable.com/u/hendrikbez)
#### Post date: [June 3, 2023, 10:21am UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/6 "2023-06-03T10:21:46Z")

</div>

I have changed it to use join, but I am getting this now on my message

Beskikbaar  
Maak seker dat jy die regte Datum en Beskikbaar totaal ingevoeg het

Total Beskikbaar: NaN

Gebruik:

 ![Screenshot_48](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/3/03aa8988cc916b5b446e6a5a7f4f62ed72da24bb.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: [June 3, 2023, 4:23pm UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/7 "2023-06-03T16:23:47Z")

</div>

If you’re getting NaN for a sum then it’s likely that one of your values (either a variable or a text input) is not a numeric value.

For these blocks, you can add labels to display the variable at each step to see where the problem is:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/f/cfe15f81bddf1c42f7e07be4ee114d0b95e79743.png)

---

<div class="post-metadata">

### Author: ![hendrikbez](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@hendrikbez](https://community.thunkable.com/u/hendrikbez)
#### Post date: [June 4, 2023, 1:56pm UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/8 "2023-06-04T13:56:58Z")

</div>

I have got this nearly working. When i first input beskikbaar value as 330 and press submit, then in message it shows Beskikbaar 330 and gebruik -330 and if i click on ok it add the correct values to google sheet of beskikbaar 330 and gebruik as 10.5. But when I do all a second time then it give the correct values for both in the message. how can i add it to catch the error why it does not work the first time

 ![Screenshot_50](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/4/349835fd47608b79bb818aa8c20a05aabcdb0617.png)

---

<div class="post-metadata">

### Author: ![hendrikbez](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@hendrikbez](https://community.thunkable.com/u/hendrikbez)
#### Post date: [June 6, 2023, 10:51am UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/9 "2023-06-06T10:51:45Z")

</div>

I have treid to work out or debug this, but i can not figure out why it does not show correct in message/alert box. why is my info to goggle sheets working, and not the alert/message

 ![Screenshot_52](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/5/d50e65345a956b162f9f9246b61e3a1f20fb882c.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: [June 6, 2023, 2:48pm UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/10 "2023-06-06T14:48:43Z")

</div>

Can you share:

1. The project link
2. The name of the screen this is happening on
3. A screenshot of the failed alert message
4. A sketch/explanation of what the alert message _should_ look like

---

<div class="post-metadata">

### Author: ![hendrikbez](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@hendrikbez](https://community.thunkable.com/u/hendrikbez)
#### Post date: [June 6, 2023, 3:36pm UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/11 "2023-06-06T15:36:37Z")

</div>

[https://x.thunkable.com/projects/647ca55b7ce51608ce950b63/be826e5a-b8bd-4c5c-8397-a0c71a038ddf/designer](https://x.thunkable.com/projects/647ca55b7ce51608ce950b63/be826e5a-b8bd-4c5c-8397-a0c71a038ddf/designer)

Screen = Voegbeskikbaarby

![Screenshot_53](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/8/982b438481513e1510d0494da1a54d7f13711183.png)

I cannot make a sketch, but this is how it must look like when i press the sumbit button  
Title [Beskikbaar]  
message:Maak seker dat jy die regte Datum en Beskikbaar totaal ingevoeg het  
newline  
newline  
Beskikbaar : 320 //getting this from inputberskikbaar  
newline  
newline  
Gebruik: 3.3 //subtrack beskikbaar before from this beskikbaar value  
newline  
newline  
Perdag: 8.79 //mulityply this gebruik with the last entry of koste

My google link

> **[Google Sheets: Sign-in](https://accounts.google.com/v3/signin/identifier?dsh=S-905788142%3A1686065833579890&continue=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F1AD9IEhbWArgAJ-bMVL2jBkevqtFMPLX1ii0MG7aby3w%2Fedit%3Fusp%3Dsharing&ffgf=1&followup=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F1AD9IEhbWArgAJ-bMVL2jBkevqtFMPLX1ii0MG7aby3w%2Fedit%3Fusp%3Dsharing&ifkv=Af_xneHCKMElRV0J6YLLgk09VQCD8uleMcScsqTLj0OM_zXo-LS3a5LxjhO4PA45xt39BmavG30k7g&ltmpl=sheets&osid=1&passive=1209600&service=wise&flowName=WebLiteSignIn&flowEntry=ServiceLogin)**
>
> Access Google Sheets with a personal Google account or Google Workspace account (for business use).

When I press ok in alert, then the Data is send to google correct no problem

---

<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: [June 6, 2023, 5:04pm UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/12 "2023-06-06T17:04:40Z")

</div>

If the alert is showing the wrong values then you need to troubleshoot the values, not the alert. You probably know that.

Focus on the blocks that set a value for Gebruik. Also, you are using a Google Sheet formula in a text Join block. That won’t work. You need to send that formula to Google Sheets using a Create Row or Update Value block.

The reason your alert “works” the second time is because after the first time the alert is shown, you create a row with the values you need in a Google Sheet.

So if you want it to work the first time, you need to create the row _before_ you display the alert.

---

<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: [September 4, 2023, 5:04pm UTC](https://community.thunkable.com/t/adding-new-alerts-in-my-alert-that-is-working-at-the-moment/2446800/13 "2023-09-04T17:04:56Z")

</div>

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