Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides guidance for some of the basic principles and practices of writing calculations or logic in CommCare

Single vs Double Quotations

Generally XPath expressions will be surrounded by quotes IE

<bind nodeset="/data/name" />

However literal values would also be surrounded by single quotes:

<bind nodeset="/data/name" calculate="'will pride'" />

Spaces

Spaces generally will not matter (i.e. Will be ignored) unless they are themselves in a string literal


References

xform details: http://dimagi.github.io/xform-spec/#xpath-paths