Hello, I have 2 tables. I want to allow users to make comments, and comments will be stored in a table. It is easy to force user's email appear next to comment in the table (hidden input = USEREMAIL() )
But is it possible to add user's email ID instead of email? Somehow taken from another table (users) with ref?
Users
ID | UserEmail |
1 | email1 |
2 | email2 |
3 | email3 |
Comments (inputed by user) PREFFERED VERSION
ID | UserID | Comment |
autogenerated | 2 | some text |
autogenerated | 2 | some text |
autogenerated | 3 | some text |
Comments (easy version)
ID | UserEmail | Comment |
autogenerated | email1 | some text |
autogenerated | email2 | some text |
autogenerated | email3 | some text |
Solved! Go to Solution.
If understanding of your requirement is correct, please make the [UserID] column in the "Comments" table as reference column to the Users table.
In the initial value setting of the [UserID] column in the "Comments" table, please add an expression something like ANY(SELECT(Users{ID], [UserEmail]=USEREMAIL()))
Please make the ediatable_If setting of [UserID] column in the "Comments" table as FALSE or deselect Show_if setting of this column.
To improve the use of User based values in an app, please take a look at the following epic tip
Current User (Slice) | How to conform your app a... - Google Cloud Community
The use of tip will help you get rid of longer expressions like ANY(SELECT(Users{ID], [UserEmail]=USEREMAIL())) while accessing a current user based values.
If understanding of your requirement is correct, please make the [UserID] column in the "Comments" table as reference column to the Users table.
In the initial value setting of the [UserID] column in the "Comments" table, please add an expression something like ANY(SELECT(Users{ID], [UserEmail]=USEREMAIL()))
Please make the ediatable_If setting of [UserID] column in the "Comments" table as FALSE or deselect Show_if setting of this column.
To improve the use of User based values in an app, please take a look at the following epic tip
Current User (Slice) | How to conform your app a... - Google Cloud Community
The use of tip will help you get rid of longer expressions like ANY(SELECT(Users{ID], [UserEmail]=USEREMAIL())) while accessing a current user based values.
User | Count |
---|---|
37 | |
30 | |
29 | |
22 | |
18 |