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

0 5 1,243
5 REPLIES 5

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 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.

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.


This error shows

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])))

Thanks works 101%

Top Labels in this Space