What is the "maxTokens" field in Address Template for?

Hi guys!

In the Address Template there is a XML field named <maxTokens>. Would someone be able to explain me its use?

eg:

    ....
    <string>country</string>
  </lineByLineFormat>
  <maxTokens>0</maxTokens>
</org.openmrs.layout.address.AddressTemplate>

LayoutTemplate.java:

It represents the largest number of address tokens on one given line. For instance, if the value is 3, then this is not allowed, on the same line, because it has 4 tokens: cityVillage stateProvince country postalCode

You can see more examples of tokens in lineByLineFormat here: https://wiki.openmrs.org/display/docs/Administering+Address+Templates

2 Likes

Thanks @dkayiwa.