How to make the data in 2 list link

List 1 (for username)

  • A01
  • A02
    List 2 (for password)
  • test1
  • test2

How to make it that during log in, user can only type A01 for username and test1 for password (A01,test1), not (A01,test2) or (A02,test1).. Sorry if it's confusing

There are lots of ways to do this, but probably the easiest is

  1. Combine the two lists into a dictionary.

  2. When you read a username, look up the correct password.

Is there any solution with "if... contains.." that doesn't require me to "set" a variable? Thanks btw

if <(item (username::variables) of ([columns v] of (list (usernames) (passwords)::list) ::list) ) = (password)> then {
say [password correct]
say [password incorrect]


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