how to add blank 'notes' column to a query?

LabKey Support Forum (Inactive)
how to add blank 'notes' column to a query? Ben Bimber  2010-11-17 07:54
Status: Closed
 
our vets print the results of queries on paper, then take these with them as they do rounds. Each row of the query contains an abnormal observation that was observed that day. They want this printout to contain a few inches of white space on the right. The legacy system gives them a table with an empty column called 'notes', where they write notes.

I would like to try to fake this in labkey. One option is to wrap a column on studydata and create a lookup to a query along the lines of:

SELECT
s.lsid,
null AS note
FROM study.studydata s

Then join this notes column into the dataset. It's an awkward way to accomplish that, but it would allow the user to add a blank column into any dataset, then print.

Is there a more direct route to accomplish this sort of thing? Thanks for the help.
 
 
marki responded:  2010-11-17 09:05
Not sure that many people would be interested in adding blank columns on arbitrary datasets, but if they do what you propose seems fine. For this case I might consider is generating custom html on the client as you might want to use custom styles to get the rows to have additional height etc.

You might also use the "print template" to clear out UI on the page. Pretty much any view (including your own html-based view) can be rendered with _print=1 to show only the content of the page.
 
Ben Bimber responded:  2010-11-17 09:08
you'd be surprised on the blank column thing. my hope is that we shift people from printing the grids to reading them directly from some variety of computer, but that will take time.

custom HTML is probably a nicer solution, but i'm looking to avoid putting too much time into this, as I hope it's lifespan is short.
 
jeckels responded:  2010-11-17 09:29
Hi Ben,

Another possible hacky solution is to use a metadata override to wrap an existing date field and set its format to ' ', including the quote characters. This column would still sort and filter with the underlying date value, but would be rendered in grids as just a space. You could use the metadata to specify a column width, but I can't think of a way to control the height of the cell.

Thanks,
Josh
 
Ben Bimber responded:  2010-11-17 09:32
hmm. that's actually much better since it doesnt add an unnecessary join.

height tends to work itself out naturally since our use cases all include the description field, which has enough height.