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