Writing to google sheet only after second scan

Hi,

when i try to scan a qr code to write to a google sheet, it works but the data only gets send to the sheet when i scan the next qr code...
So the last scanned QR never appears in the sheet.

Hello Daan, welcome to the forum.

Well, there are a few basic things wrong with your code:

  1. The procedure 'scanqrcode' calls another, 'procedure2'. You can't do this safely. Is there any reason why 'Label' can't be populated in procedure 'scanqrcode'?

  2. When Knop1 is clicked, just call procedure 'scanqrcode' - do not empty the list here as it could be the data that procedure 'scanqrcode' is adding. Clear the list in procedure 'scanqrcode' before adding data [This is probably the cause of your issue].

  3. Do not use 'Open another screen' for Screen1 - every time you do, an additional Screen1 will be created until the App crashes. If you want to return to Screen1, simply close the current screen.

Something more like this:

image

1 Like