getCurrentBranch( )

Get the ID of the current branch.

Syntax

getCurrentBranch()

Parameters

None.

Return value

  • String value that constitues the current branch's ID.
  • Empty string if the visit is not a branch visit.

Usage tips

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

Examples

Example 3-94 If the current branch is 'Branch01', set value of a dropdown to true

if (getCurrentBranch() == "Branch01") {
  return setChoiceLabel("TRUE");
} else {
  return setChoiceLabel("FALSE");
}