Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Once legacy data is added, the custom field may become unnecessary for new entries, but should remain visible for existing records with values.

Expand
titleExpand...
Example
: Displays the "Core Size (mm)" field in the overview page only if it has a value
Code
Code Block
{
      "name" : "specimen.extensionDetail.attrsMap.core_size_mm",
      "caption" : "Core Size (mm)",
      "type" : "text",
      "showInOverviewIfshowIf" : "!!specimen.extensionDetail.attrsMap.core_size_mm",
      "showInOverviewIf" : "useShowIf"
      "optional" : true,
}

Displays the "Core Size (mm)" field in the edit and overview page only if it has a value.

Explaination: Uses the double negation (!!) to check whether core_size_mm has a true value.
If core_size_mm is empty, null, or undefined, this condition will evaluate to false, preventing the field from displaying in edit and overview page.

Show/Hide custom field – Using Regex Matching

Show the 'Lived Name' custom field only when the PPID starts with 'J'.

...