Hello . I would like to know if it is possible to create this relational data?
for example, I have table A and table B
In Table A , there would be 4 columns as following,
- task name
- button that click to take a task and modify user column =user( )
- relational database from table B, for example department.
and Table B , maybe, have two columns
Then, I want to click button and then pull information of table B department to Column A department
Can anybody help with code?
TableB.filter(currentValue.user = User() ).First().Department
The First() is there in case your other table has multiple rows for the same user, ensuring you always get one result.
Just to be clear, the above pulls department of the currently logged in user. If you instead want a column formula for the department of whatever user is chosen in a row, it’s
TableB.filter(currentValue.user = thisRow.user).First().Department
thisRow means the row of the table this formula is in
CurrentValue means a row in the other table that is currently being evaluated by the filter (the filter will loop over all rows of the other table looking for a match)
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.