Making a list's primary key visible in details view

LabKey Support Forum (Inactive)
Making a list's primary key visible in details view Will Holtz  2016-01-13 11:16
Status: Closed
 
I have a list and I'd like for the primary key to be visible in the details view. In the list design editor, I have selected the 'Shown in Display': 'Details' checkbox. I also tried used in the Schema Browser to edit the metadata source. I added:

<shownInDetailsView>true</shownInDetailsView>

to the PK column. Neither of these gave me the desired result. Am I missing something?

thanks,
-Will
 
 
Jon (LabKey DevOps) responded:  2016-01-13 12:19
Hi Will,

Have you tried to add the Primary Key field as a column to your view and then proceed to view the details of the record?

That was the only way I could get it to appear in the details page.

Regards,

Jon
 
Will Holtz responded:  2016-01-13 13:04
Hi Jon,

For me, even with the PK visible in the view, the details link does not show the PK field.

-Will
 
Jon (LabKey DevOps) responded:  2016-01-13 13:11
Hi Will,

Can you also go into Admin > Site > Admin Console, click on Caches and then select "Clear Caches and Refresh"?

After you do that, check the details again for the record in your list to see if the PK field appears in the details.

Regards,

Jon
 
Will Holtz responded:  2016-01-13 13:21
Hi Jon,

I cleared those caches and then tried again, including from views with the PK, and still did not get the PK to show up on the details page.

thanks,

-Will
 
Jon (LabKey DevOps) responded:  2016-01-13 13:32
Hi Will,

If you take a look at my example here, you can click the details and get the Primary Key within it.

https://www.labkey.org/home/Demos/ListExamples/project-begin.view?

My list has no additional metadata being used, just the addition of using that primary key as a column.

What version and build of LabKey are you running? Our labkey.org site is currently on 15.3 r41244.10 at the moment.

Regards,

Jon
 
Will Holtz responded:  2016-01-13 14:00
Hi John,

After a bit more poking around, I figured it out. The visibility of the PK in the details view is not dependent on the view that was currently being used when the details link was clicked. Instead, it is dependent on the default view for that list.

thanks for your help!

-Will