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

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
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
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

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

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

Did do it, but stil gedt the error

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

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.

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

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

Total Beskikbaar: NaN


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:

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

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

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

Screen = Voegbeskikbaarby


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
Beskikbaar : 320 //getting this from inputberskikbaar
Gebruik: 3.3 //subtrack beskikbaar before from this beskikbaar value
Perdag: 8.79 //mulityply this gebruik with the last entry of koste

My google link

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

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.

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