fetch password from another table

hello, am new to AppSheet and am having this little problem

i have two tables
table1(client name, mobile, email (Ref to table2), password(text))

table2 (email(email), password(text), platform)

i added the below two expressions, 1 each time, of course, to app formula of password field in Table 1, but always the field password fetch the password of the first record in Table 2.


Exp1 = Any(Select(Streaming Accounts[Password],[Email]=[Email]))

Exp2 = LOOKUP([Email], Streaming Accounts, Email, Password)

any help 

0 3 146
3 REPLIES 3


@RoyJalbout wrote:

hello, am new to AppSheet


First, I just want to make sure you know that AppSheet does have its own security built-in using authentication services such as Google, Microsoft, ect.  I do understand that many attempt to build their own login capability to avoid the per user licensing.  But that also means you cannot know the identify of the person accessing the app (i.e. no login email is used) and therefore are much less secure by today's standards.  If your app requires strong security, please do not attempt to build your own login feature.  

Having said that....


@RoyJalbout wrote:

i added the below two expressions, 1 each time, of course, to app formula of password field in Table 1, but always the field password fetch the password of the first record in Table 2.


Exp1 = Any(Select(Streaming Accounts[Password],[Email]=[Email]))

Exp2 = LOOKUP([Email], Streaming Accounts, Email, Password)


In both of these you need to use the [_THISROW] qualifier on your [Email] column to distinguish between the current row value versus the table row value.  Like this:

Any(Select(Streaming Accounts[Password],[Email]=[_THISROW].[Email]))

OR

LOOKUP([_THISROW].[Email], Streaming Accounts, Email, Password)

I am not sure why LOOKUP cannot deduce the [_THISROW] qualifier, maybe it is to maintain consistency?  Just know it's needed.

I hope this helps!!

thanks for your help

am building an app to maintain my clients subscriptions

i tried your 2 edits but also no results the password field still empty

Problem solved

I removed the link to tabke from email field and changed to text, after that i add it to valid if for email field to [table2].[email] and now works perfectly

Top Labels in this Space