Connect multiple tables with the same reference

Hi all,

i am pretty new to Appsheet, so far really an impressive Tool.

I stumbled onto the following problem and wasnt able to solve it (even though i really searched in existing threads and documentation).

Lets say i have three tables as my data, purpose of App is to simply create comments for employees.

One table has the names per emloyee-ID, second table has the department per employee-ID. Third table is were the app user can enter comments for an employee-ID.

I now want to reference all three tables via the employee-ID, so that the user can open a form view to enter comments in the app. In this view the user first enters the employee-ID and then it will automatically display the right name and departments of this employee-ID.

So really a simple use case, connecting 3 tables via the same reference. Each ID can of course only have one name and one department.

I didnt manage to accomplish this, connecting 2 tables is not a problem but 3 didnt work. I tried it e.g. via a virtual column but i can only reference to the table which is chose when specifying the referenced table after setting data typ to "Ref" for PersonalID.

Data Explorer Screen for better understanding:

MartinL__0-1667837609039.png

Thanks in advance for any help.

 

 

Solved Solved
0 4 959
1 ACCEPTED SOLUTION

Thanks Marc

i followed you advice and discovered "Chained dereference expressions", which is what i was looking for. ๐Ÿ˜Š

View solution in original post

4 REPLIES 4

It's not very clear exactly what you're trying to do, or where your issue is. You have the refs set up, thus your tables are connected. What are you trying to do with that connection?

I think you might have the name-to-dept reference backwards. With your current setup (nameRef in Dept table), that means a single Name can have multiple departments. That doesn't seem right. It seems more likely that you'd want a Dept Ref in your Name table, i.e. a single Dept can have multiple Names.

Thanks for your reply and sorry, i try to explain again.

Purpose is to build an App to maintain (add/delete/change) information (e.g. Text) for employees.

This should be done via a form view in the app, where the user enters the employee ID and than the app shows the referencing name and department for this employee.

We have our employee information in different tables, each with only the PersonalID as the unique key and identifier.

So how can i connect multiple tables based on the same reference type?

I need the Name, Department, Salary from tables B,C,D as VCs in A, so that the user will see this information when entering a comment in the app. Its no problem to connect 2 tables and create a derefernce VC, but how about 3 or even more tables?

MartinL__0-1667843755799.png

 

 

 

In general, I think you probably just need to learn more about how Appsheet and references work. Do some reading and experimenting.

 


@MartinL_ wrote:

Its no problem to connect 2 tables and create a derefernce VC, but how about 3 or even more tables?


What difference are you seeing going from 2 to 3 that is causing an issue?

 

Thanks Marc

i followed you advice and discovered "Chained dereference expressions", which is what i was looking for. ๐Ÿ˜Š

Top Labels in this Space