Problem with insert in a spreedsheet

Hello,
i have a google spreedsheet (Docenti) with one sheet (inAttesa).
inAttesa has this columns: Email,Password,Nome,Cognome,OTP.
I need to verify if an email is already inside inAttesa, if there is i only write a message “Email already used”.
On the contrary, i have to insert the record inside inAttesa with OTP field empty

I don’t understand why it doesn’t work

Could you help me please?
Thanks in advance

Which part does work and which part does not work? What are you seeing that indicates that it isn’t working?

You should be aware that there has for a long time been a bug with the get value data source block. If possible, try using the get row object block instead. You can test your code by inserting a block right before the if block that shows the result of the get value block in a label and adding a short wait time after it. That way, as your loop runs, you can watch the values to see if they are the same as in your data source.

First if…it works.
Second if, it doesn’t work.

So it does not create a row in the data source?

What happens if you add a block above the create row block that changes the value of a label’s text? Does that get displayed?

You’ll need to do some troubleshooting like this. I have a method I use: Debugging in Thunkable X (Video)

This works.
When i click the button a row is inserted without problem.


It also works. I tried a debugging system printing some variables. Everything is ok here.

Now i will try to stop the loop, exit and look for a warning variable printing it.
It doesn’t work


I don’t read “Out of the loop”.

Maybe i found the possibile situation of error:


looking at “numers of rows in Docenti inAttesa” i print 27(WHY??). Inside the sheets there are only 3 rows.
Could be this the problem?

Are there blank rows at the end of the data source? That happened to me recently with Google Sheets.

This is how sheet appears:

27???

Try syncing the sheet from the Data Sources section in the Design tab. After you do that, drag in a new list of values block.

It should be retuning 8, not 27.

After deleting the sheet Docenti, reuploading the same file, syncing and changing all the block it continues to print 27.
It is really strange!

Update:
If you are able to guess what this print you are a genius.

27?

If you’d like, you can share the spreadsheet with me and I’ll try the same thing and see what happens. I know that’s not very useful but it could identify a bug if it happens to me too.

it appears: UNDEFINED! incredible…
ok, give me your email please so i can share the spreedsheet

Thank you.

I’d prefer you to send a share link as a private message on the forums. I don’t usually give out my email address.

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