Linking between custom tables

LabKey Support Forum
Linking between custom tables marcia hon  2018-12-03 12:45
Status: Closed
 

Hello,

I have table_a with column "participant"

and

table_b with column "participant".

I would like for these columns to be linked.

I know I can do foreign/primary key.

In the attached screenshot, I would like the Participantid to link both tables.

In my second screenshot, this is what I would like to have. A location with all the links.

I look forward to your expertise.

Thanks,

 
 
Jon (LabKey DevOps) responded:  2018-12-17 23:07
Hi Marcia,

You should be able to go into each dataset and enable the ParticipantId field to use a URL property and use a substitution token to populate the participantId value.

For example, this is what we have listed for one participant in our demo study:

https://www.labkey.org/home/Demos/Study/demo/study-participant.view?participantId=103505

We can insert the following into a URL property field, which would redirect the end-user to the participant view page for this participant:

/study/participant.view?participantId=${ParticipantId/ParticipantId}

For more details, please take a look at our documentation below:

https://www.labkey.org/Documentation/wiki-page.view?name=urlEncoding#display
https://www.labkey.org/Documentation/wiki-page.view?name=addSimpleUrlProperty
https://www.labkey.org/Documentation/wiki-page.view?name=participantViews

Regards,

Jon