Problem with updating a list

Hello Everybody! In advance, sorry for my bad english :slight_smile: !

I am experiencing difficulties updating a list in the app that receives data from Google Sheets. The issue I'm facing is that the list keeps printing itself repeatedly instead of updating. I am hopeful that someone can assist me.

I will share some images of my blocks with you!
When I tap on buttons (Flex QR or Use Picker) and perform the necessary actions, the list should be updated. However, my problem lies in the second photo.

My objective is to have a single list that automatically updates itself whenever I perform actions with the other buttons (Flex QR or Use Picker)

Try like this:

image

Hi! @TIMAI2 the solution you provide is not working, it keeps printing the list again and again. :frowning:

You must have a set of blocks in there somewhere that are performing the duplication?

All I can suggest is that you upload your aia project for someone to take a look at what is actually happening....

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

Here its my aia! Hope someone can find the error, i only want the list to update and no everytime I press the button the list prints itself again and again.

UniImportsApp.aia (167.5 KB)

image

From a quick look, you appear to be create a "scan loop". With the button click you call a doScan, then in the afterScan event you call a doScan again. This will repeat over and over and over. Why ?

Also, can you provide something for me to scan for testing ? An image of a qrCode ?

The loop is necessary because the scan checks if the number is already in the list. If the number is not in the list, the code will execute the procedure to save the information in the list. On the other hand, if the number is already in the list, it will notify that the QR code has already been picked and prompt to scan another QR code using the ScanCamera again.

Thanks in advance and hope you save me @TIMAI2

Here its an image:
image
Another question, its possible to extract the info of "Zona 5 Buceo"only?

I do not believe that this will ever be true, with your blocks as they are:

image

You might be storing data to tinydb but you do not load the list from the tinydb when your app starts.

Are your google form responses stored into a Google Sheet ?

You also need to check your repsonseContent coming back from the form submission, I do not believe it is returning what you are expecting.

You also need to handle the doScan result as a dictionary, and select items by key/value to test and store values

You have also spelt submit/Submit incorrectly in your url
formResponse?&sumbit=Sumbit?usp=
although it doesn't appear to be making any difference.....

It's my first time creating an app.

Its difficult for me to understand all the things you are saying (Tinydb, for example)

To make this, I make some changes for an app created on a youtube video to perform what I need.

However, the form responses are stored in the GoogleSheet, I wll share a pic with the same QR I sent to you:

If this is the name of the qrCode image then you can use that, otherwise you will need to include it in the free text in the qrCode, or use some other method

I already create the other lists. But I can't manage to add this info from picking. I want that every time I pick with qr reader add +1 to 100
image

You do not appear to be using the data returned from the scan ?

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