Comparing User name and password between google sheet and application

I am working on an application where I read the User ID and password from a Google Sheet.

If there is a match between the User ID and password stored in the Google Sheet and the information entered in the application, I need to display a success message.

This is what I have completed so far. Could you please assist me?

What are in the columns of your table?

I have user name, ID, password and claimed(yes/no)

From the look of your blocks, pushing Button1 will retrieve your sheet, and then when it arrives, it will be displayed in ListView1 for every one to see all the user names and passwords.

I imagine you do that only for testing.

You did not show the URL used in the Web request in Button1.Click.

Look in this FAQ for how to set up web requests against a sheet.

“Please check this code, it always displays no match even if they are equal

use the companion app and Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools

Taifun

this is the code, screenshot of the companion app, the google sheet

You can see it display no match

You are treating your table like an unravelled sweater when you add 5 to the list index.

A table is a list of lists.

If you want to check the cell at column c of row r, code

Select item c of (select item r of myTable)

This code selects the row first, then the value at the requested column number.

I’d say there are others chars in your ID variable ( as length is 7 and not 6 ) maybe a space…

  1. you are converting your csv reply string to a list

  2. you are splitting the textual representation of the list, reconverting to a list again ( this second step is not needed and probably causes the issue )

  3. length of “1002” is 7 ( which should mean there is a spurious char at the end of the string )

how can i remove it

Sorry, uploaded the original image without arrows:

Simply in point 1) rename variable ‘table’ to ‘user’, and remove blocks in point 2)

I renamed variable ‘table’ to ‘user’, and remove blocks in point 2 but I got this error

That's because you only have 3 rows, and you did not nest your Selects like I recommended.

How to do it

Did not consider that now your list ‘user’ is a list of list.

You can extract the data from a row like this ( set row to 1,2 or 3 ):

list03.aia (2.6 KB)

P.S.

or as @ABG already said, export only a row

Do we need to take a few steps back and deal with the basics first ?

My eyes are not that good ( the first block is a “list from csv table” ):

list03.aia (3.1 KB)

Even better, see

What about the remaining elements stored in row 2 and 3.

If I set the index to 6, i get an error