Referencing another table - for user roles, but use the current user email?

I want to be able to check if the current user (by their login email) is an admin. If so, then they have certain rites.

I have two tables:

Message Table
Admin Table

In the “Message Table” i use “ref” to search the “Admin Table” for users. That works, however - i want the current user (by email) to auto fill the rest - NOT a drop down menu.

So… If I am an Admin and i am in the app. I want to be able to go to the form. The form will auto populate my credentials, then i can complete the message.

Currently - it gives me a drop down menu as i have that “ref” Type.

Thoughts?

Solved Solved
1 6 405
1 ACCEPTED SOLUTION

Ah, okay. You want the Message table’s User column value auto-populated with a Ref to the current user’s Admin table row. To do so, set the Message table’s User column Initial value expression to something like this:

ANY(
  FILTER(
    "Admin",
    (USEREMAIL() = [user email])
  )
)

View solution in original post

6 REPLIES 6

Steve
Platinum 4
Platinum 4

What does this mean?

Ah, okay. You want the Message table’s User column value auto-populated with a Ref to the current user’s Admin table row. To do so, set the Message table’s User column Initial value expression to something like this:

ANY(
  FILTER(
    "Admin",
    (USEREMAIL() = [user email])
  )
)

Man you are good! Worked perfectly!

3X_7_6_7678c8c7a926c22413d04fabd088b3971485ab93.png

Top Labels in this Space