> For the complete documentation index, see [llms.txt](https://help.auxalia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.auxalia.com/plant-tools/plantexpresstools/how-to-use/calculations/additional-functions/ptlongeststring.md).

# PTLongestString

This function returns the longest string. You need at least 2 strings/properties for the comparison.

You could do the same with **IIF** functions and comparing the lenghts, but if you have a lot of properties you want to compare, this function is much easier to use.

![](/files/YzSyhaXh0W1kTUOq3d8L)

The result can be seen in the **Calculated Property by PET**.

![](/files/lD0LLxLavNMDhVsgESVy)
