Using custom configuration, users you can set fields to show or hide based on value values selected in another field.
Note |
---|
The rules added for skip logic is only reflected on add/edit pages. Overview The overview page is a superset of all fields described in the data dictionary. |
Example
...
1:
...
Show
...
custom
...
field(Relation
...
to
...
Proband)
...
if
...
value
...
selected
...
in
...
'Proband'(RB10)
...
field
...
is
...
'No'
Expand |
---|
Code Block |
---|
{
"name": "cpr.participant.extensionDetail.attrsMap.DD15",
"caption": "Relation To Proband",
"type": "dropdown",
"optional": true,
"showIf": {
"op": "AND",
"rules": [
{
"field": "cpr.participant.extensionDetail.attrsMap.RB10",
"op": "==",
"value": "'No'"
}
]
},
"listSource": {
"apiUrl": "forms/permissible-values",
"selectProp": "value",
"displayProp": "value",
"queryParams": {
"dynamic": {},
"static": {
"formName": "kMCParticipantExtension",
"controlName": "DD15"
}
}
}
} |
Screenshot when the field is |
...
...
Image Added Screenshot when the field is |
...
...
Image Added
|
Example 2: Show 'Storage tube' custom field only during the creation of aliquots.
Expand |
---|
Code Block |
---|
{
"name": "specimen.extensionDetail.attrsMap.ST3",
"caption": "Storage tube",
"type": "text",
"optional": "true",
"showIf": {
"op": "AND",
"rules": [
{
"field": "specimen.lineage",
"op": "==",
"value": "'Aliquot'"
}
]
}
} | ,
|
Example 3: Show 'COVID-19 Test Date' visit custom field when the visit date is after '23 January 2020'.
Expand |
---|
Code Block |
---|
| {
"name" : "visit.extensionDetail.attrsMap.DP13",
"caption" : "COVID-19 Test Date",
"type" : "date",
"dateOnly" : true,
"optional" : true,
"showIf" : {
"op" : "AND",
"rules" : [ {
"field" : "visit.visitDate",
"op" : ">=",
"value" : "1579717800000"
} ]
},
"showInOverviewIf" : "useShowIf"
} |
Info |
---|
"1579717800000" is the number of milliseconds elapsed since Unix time Epoch on 23/01/2020 at 00:00:00 hrs UTC. |
|
Example 4: Show 'Upload image' specimen custom field when it's primary specimen (lineage is 'New') and type is 'Whole Blood'.
Expand |
---|
Code Block |
---|
{
"name" : "specimen.extensionDetail.attrsMap.FU2",
"caption" : "Upload image",
"type" : "file",
"optional" : true,
"showInOverviewIf" : "useShowIf",
"showIf" : {
"op" : "AND",
"rules" : [ {
"field": "specimen.lineage",
"op": "==",
"value": "'New'"
},{
"field" : "Specimen.type",
"op" : "==",
"value" : "'Whole Blood'"
} ]
}
}, |
The field looks like below on the specimen overview page |
...
: Image Modified |