Confused about reference to child reference with [Related Rows]

This is a minor issue that can be solved with a VC, but I would like to understand what I am doing wrong, or if this is simply not meant to work the way I expected.

I have a parent table (session), with related child entries (session_users). There is a lookup table (users) which contains properties for the child entries. Can be seen in this sample app https://www.appsheet.com//templates/?appGuidString=1503869e-e9fe-4c60-8067-ea908a1a3c34

The issue arises when I attempt to use [Related Session_Users] to reference values from the Users table, while looking at the Session (parent) table.

[Related Session_Users][ref_user_id]

Returns the correct key for the Users table, but trying to use that key in a SELECT, fails

SELECT(
  Users[user_property],
  [user_id]=
    INDEX(
    [Related Session_Users][ref_user_id]
    ,1)
)

It returns the correct value, but ALSO the last row of the Users table.

I can add VC's to the User_Sessions table to get all the columns from Users that I might want to display in Session, but I was trying to minimize VC use and it feels like I am making an error here somewhere.

 

temp.png

0 6 104
6 REPLIES 6
Top Labels in this Space