> 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.

![](https://2994090777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZH2AGHzvPfBW7YdaaGc0%2Fuploads%2Fgit-blob-9fcd9417556fdb60b1c34ee991aeb6d16ea0c555%2FCalculations-79.png?alt=media)

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

![](https://2994090777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZH2AGHzvPfBW7YdaaGc0%2Fuploads%2Fgit-blob-b719c44b8992c350e5d679ae92caec976846006d%2FCalculations-83.png?alt=media)
