Valid IF with 2 conditions based on other table

Good day,

I would like to ask for assistance I am new with appsheet.

I have 2 tables “Payments” and “User”

In “User” table there are 3 columns [Username], [Userrole] and [System Password]

In “Payments” table there are 8 columns. Two of the column [Username] and [System Password] are similar to “User” table.

What I want to achieve in valid if “Payments” table. The column [Username] in Payments table should match with User Table and the column [System Password] in “Payments” table should match the column [System Password] in “User” table.

Can someone suggest a expression?

Thank you

Hello @Eoj_VT, you could try these expressions:

For the [Username] valid if:

IN([_THISROW],User[Username])

For the [System Password]

ISNOTBLANK(LOOKUP([Username],"User","Username","System Password")=[_THISROW]))

or

ISNOTBLANK(FILTER("User",[System Password]=[_THISROW].[System Password],[Username]=[_THISROW].[Username])

Or, if you want to run both checks at the same time so your user doesn’t know which one is wrong, you should only use the one for the password on your password column or a helper column, with a message that says something like “Wrong username or password”

But :bear: in mind that the username + password systems in AppSheet are not very secure, since once the app loads all this information is stored in the user’s device.

1 Like

Thanks for the reply I will try this expression above. It will not show once they successfully save. I am using the show if “Isnotblank”. And user table can only be acces by admin. Will posted here if this formula works.

1 Like


This error shows

1 Like

My bad, i’ve been making too many formulas in sheets and not too many in appsheet, here’s the fixed one:

ISNOTBLANK(FILTER("User",AND([System Password]=[_THISROW].[System Password],[Username]=[_THISROW].[Username])))

3 Likes

Thanks works 101%

2 Likes