getCompletedCycle( )
Retrieve the number of cycles that were completed by a subject.
Syntax
getCompletedCycle(visitShortName)
Parameters
Parameter | Required/Optional | Description |
---|---|---|
visitShortName |
Required |
The short ID for the visit you are querying for. |
Return value
Numeric value:
- The number of cycles where the visit is in the Completed status.
- -1 if the given visit is not a cycle visit.
Usage tips
If the branch name is changed between study versions, use the isStudyVersion( ) function to get the appropriate name.
Examples
Example 3-101 If 3 cycle visits for a subject have been completed, set value of a dynamic form launch item to true
if (getCompletedCycle("Vitals") == 3) {
return setChoiceLabel("TRUE");
} else {
return setChoiceLabel("FALSE");
}
Parent topic: Multiple visit schedules and cycle visit functions