Grid views and alternate format strings

LabKey Support Forum (Inactive)
Grid views and alternate format strings Will Holtz  2016-10-04 09:14
Status: Closed
 
I have a grid and one of the columns in that grid I would like to have the number of decimal places displayed to be dependent on the grid view. So with grid view A, the format string is ###.0 and with grid view B, the format string is ###.00. I can't find a way to do this in a .qview.xml file, but perhaps I am missing something in my reading of the labkey xsd. Is this possible?

I can make a new query (SELECT * FROM existingQuery) and set a different format string in the .query.xml file for the new query. But then I have two queries instead of two views.

thanks,

-Will
 
 
Jon (LabKey DevOps) responded:  2016-10-04 13:15
Hi Will,

Are you setting up two qview.xml files for each respective view?

You should be able to pull off both by having two distinct qview.xml files like:

.qview.xml <- The Default view that always will appear
gridViewA.qview.xml <- The view for Grid View A with the format string of ###.0
gridViewB.qview.xml <- The view for Grid View B with the format string of ###.00

Or you can set it up to where you don't have three qview.xml files and just have the default reflecting the format for Grid View A and then leave Grid View B (or call it something else):

.qview.xml <- The view for Grid View A (made as the default) with the format string of ###.0
gridViewB.qview.xml <- The view for Grid View B with the format string of ###.00

Regards,

Jon
 
Will Holtz responded:  2016-10-04 13:24
Hi Jon,

Thanks for the reply. And it appears I failed to make my situation clear -- sorry about that. I am aware that multiple .qview.xml files is how multiple views are done. But I haven't been able to figure out the xml code for setting the format string within a .qview.xml file. I have only done format strings in .query.xml files and domain definition files. I looked through the Labkey xsd, but didn't see a way to set a format string from http://labkey.org/data/xml/queryCustomView. I also grepped the source tree and didn't find any format strings in .qview.xml files, but this may have been a false negative, as I don't know exactly what I'm looking for. Can you supply a .qview.xml file that contains a format string?

thanks!
-Will
 
Jon (LabKey DevOps) responded:  2016-10-04 13:59
Thanks for the clarification Will.

So unfortunately, it looks like we don't support this feature at this time. I've made a request to have this added in for a future release though, it's a really good idea to have for our customize views.

https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=28064

Regards,

Jon