How do I get relationship column from data table (ui builder)

I have two tables with a 1:1 relationship

test_samp_info and test_trace

test_samp_info is the parent and the relationship column is “trace”
test_trace has a column test_samp_info[trace]

I am loading test_samp_info into a ui builder datatable
I have an on record selected event
I am trying to populate some ui builder input fields that have data binding
I can set the parent table fields without a problem
I am trying to set “page_gsash_dry” a databinding to another input field
to the value of a column in the child table but I clearly do not understand how to reference it.

this is what I have set up. when I run this, it only gives “[object Object]” in the page_gsash_dry field

My app id: 9359F741-6D5D-AEF2-FF22-4834A2050400
the page in question : relationship_test
I want to set page_gsash_dry to value of column GSAsh_Dry using the Sample_ID from table test_samp_info loaded into the ui datatable.


if this was SQL I think this would get it.

SELECT test_trace.GSAsh_Dry
FROM test_samp_info
JOIN test_trace ON test_samp_info.Sample_ID = test_trace.Sample_ID
WHERE test_samp_info.Sample_ID = “myid”;

it looks like relations work like joins but I’m not able to figure out how to get working.


Hello, @hharrington!

This situation occurs because the page_gsash_dry property contains an object, hence it displays as ‘[object Object]’ in the table. You can resolve this issue by first extracting the value from the relation column, then selecting the specific value you need and setting it into PageData:

I also highly recommend watching this video where a similar question is addressed:

Hope this helps. Looking forward to your success!