...
Code Block |
---|
{
"name" : "specimen.extensionDetail.attrsMap.made_method",
"caption" : "Made Method",
"type" : "dropdown",
"showInOverviewIf": "useShowIf",
"showIf": {
"op": "AND",
"rules": [
{
"field": "specimen.lineage",
"op": "==",
"value": "'Aliquot'"
},
{
"field" : "specimen.type",
"op" : ".search('RNA|DNA')!=",
"value" : "-1"
}
]
},
"optional" : true,
"listSource" : {
"apiUrl" : "forms/permissible-values",
"selectProp" : "value",
"displayProp" : "value",
"queryParams" : {
"dynamic" : { },
"static" : {
"formName" : "epidemiology_specimen_custom_form",
"controlName" : "made_method"
}
}
}
}, |
Hide Custom Field For Newer Data Entry
Once legacy data is added, the custom field may become unnecessary for new entries, but should remain visible for existing records with values.
Expand |
---|
|
Example: Displays the "Core Size (mm)" field in the overview page only if it has a value Code Block |
---|
{
"name" : "specimen.extensionDetail.attrsMap.core_size_mm",
"caption" : "Core Size (mm)",
"type" : "text",
"showInOverviewIf" : "!!specimen.extensionDetail.attrsMap.core_size_mm",
"optional" : true,
} |
|
Show/Hide custom field – Using Regex Matching
Show the 'Lived Name' custom field only when the PPID starts with 'J'.
...