Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added documentation about accessing value of a new relationship


  • Since version 1.9.4, you can specify an 'id' attribute in a relationship tag (for example: <relationship id="relationship" .../> and access the value of an existing relationship using this id and the name of the relationship type (-use camel-case if the name has more than one word).
    Example: relationship.mother.value, relationship.accompagnateurLeader.value, relationship .guardianNonParent.value

          To access the value of a new relationship, use "newRelationship" for the name of the relationship type.
          Example: relationship.newRelationship.value

Also note that attempting to use a less than (<) symbol within javascript will result in an error when saving the form, because the < symbol will be interpreted as the beginning of a tag. Use: