Table of Contents |
---|
Introduction
Using 'showIf' and 'showInOverviewIf' conditions, you can hide specific fields either from all specimens pages or from parent/child pages. You can also hide or show fields based on some other field's value.
...
Both the fields will be displayed for the child specimens (lineage: derived/aliquot).
Example 2: Display specimen type field only on child pages and not on primary specimen page.
Code Block | ||
---|---|---|
| ||
{ "name": "specimen.type", "caption": "Specimen Type", "showInOverviewIf": "specimen.lineage != 'New'", "type": "specimen-type", "specimen": "specimen", "optional": true } |
Specimen field not displayed on parent specimen page:
Specimen field displayed on child specimen page:
Hide/Set Default Value to Mandatory Fields
...
Code Block | ||
---|---|---|
| ||
{ "name" : "specimen.anatomicSite", "caption" : "Anatomical Site", "type" : "pvs", "attr" : "anatomic_site", "optional" : true, "showInOverviewIf": "useShowIf", "defaultValue" : "Abdomen, NOS", "showOnlyLeafValues" : true, "showIf" : { "op" : "AND", "rules" : [ { "field" : "specimen.lineage", "op" : "!=", "value" : "'Aliquot'" } ] } } |