isSubjectOnBranch( )

Check if a subject has started any visit in a specific branch.

Syntax

isSubjectOnBranch(branchShortName)

Parameters

branchShortName

The branch short ID for the branch you are querying for.

Return value

Returns true if the branch with the short name branchShortName contains any visits where data has been entered or false if no visits are initialized in that branch.

Note:

If the branch name is changed between study versions, use the isStudyVersion( ) function to get the appropriate name.

Example 3-93 If subject is on Branch01, set value of text box to "Branch1"

var onBranch = isSubjectOnBranch("Branch1");
if (onBranch) {
  return "Branch1 has been started";
} else {
  return "Branch1 NOT started";
}