Scan QR Code Issue - Repeating the action 4/5 times

Hello everyone,
I have an app based on a QR Code scan - it used to work perfectly but know that i’m working on it again for a couple of updates, i realised it has now a couple of problems qcode-related
It was working just fine until i tried it again on Thunkable app

Here the relevant blocks:


In these blocks the camera scans the QRCODE and receives a value. If this values is = to another, it continues to “Scrivi Orario” - and here is where the problems lays

Here the “Scrivi Orario” function:

Everything was working fine, and still is working fine on the app in the stores, it writes values into an Airtable table once.
This is what it’s supposed to do:
image

Now what is happening is that the app is writing 4 to 5 times all together.
This is what is happening at the moment:

Anyone faced a similar issue or know how to solve it?
I run out of ideas and the update is really important - i’m not confident on uploading an app with this issue as many clients are using it atm.

Thank you very much for your help

I’d like to add that i’m using the latest Thunkable version on app and my Android device is updated to its latest version

What’s missing from your screenshot is the event block. What is above those blocks? Is it a When button click event? What happens if you add a counting variable to the “then do” section and display its value when the function is done? Does it count up 4 to 5 times?

Having a full screenshot of those blocks without anything cut off would be helpful.

Thank you @tatiang for your time.
Above the API call is an not relevant block that just triggers in a couple of events that are not linked to this function - i tried already to cut them off and just keep the API call and it gives the same result

Here is the full block - in this case the variable “LocaleScannato” is “WikiWoo”, so no one of the one above

I also would like to mention that there is a different block after the API call, that includes a List block, and also that one is repeated three to five times

This means that in the List “ListaDipendenteOrari” it inserts the text 3 to 5 times.

Here are the relevant complete blocks - sorry i had to take more pictures are they are very long:

I also tried to change the “LocaleScannato” variable to another one but it still does this action 3 to 5 times instead of only one.

What happens if you remove ALL blocks from ScriviOrario and just put a Change App Variable by 1 block there and display the value of that variable? I’m trying to determine if that function is getting called multiple times somewhere else in your project.

Hello tatiang,

Here are the blocks:

And here is the result, as you can see the word “Prova” was written more than once (five times now)

Tried again with simpler blocks and the action is always performed at least 3 times

And this is what happens in Airtable

There are not multiple actions on that scan block and again, in the published app everything works 100%

It gives me a value of “4”


Hi @maurizio.polverini89
As we said in a separate support channel, this issue only happens with StP blocks on Android.

Could you please use the DnD scanner block?

You can find it here:

And you can convert it to the advanced block:

1 Like

It works!

Thank you very much for your help!

1 Like