Hiding the Date Field in a Visit Based Study Greg Taylor  2014-09-10 14:51
Status: Closed
 
You may have noticed that the 'Date' field (since 14.1) is present in all datasets for a Visit based study. Several users have asked if it were possible to hide this new required field. The desired effect is that the 'Date' field should be hidden when editing or inserting a new record. In response, we have crafted a way to hide this field using a number of different mechanisms involving metadata.

You may configure on a per-dataset, per-study, per-project, or per-server basis to hide the column. At the dataset level, this can be done via XML metadata scoped to that dataset. On a study or project basis this can be done by setting XML metadata scoped to the 'study.studydata' query, either in a module that's enabled for that folder, or via the schema browser. On a server basis you would edit the metadata for the 'study.studydata' query in the /Shared directory which will propagate this metadata to all other folders by default.

Below is sample metadata that will hide the 'Date' column.
<tables xmlns="http://labkey.org/data/xml">
  <table tableName="TestDataset" tableDbType="NOT_IN_DB">
    <columns>
      <column columnName="date">
        <isHidden>true</isHidden>
      </column>
    </columns>
  </table>
</tables>

Hope this helps,
Greg