Syntax error in custom table format

Originally commented in Customizing Table Formats and Aggregation.

Moved to Get Help by @Specify


I am trying to perform small manipulations within the formatter, like taking only the first letter of the firstName field. I wrote something like this:
<field sep=", ">substring(firstName, 1, 1) + "."</field>
but I get an error that the field name “substring…” is not recognized. The script does not interpret the function name correctly.
What is the correct syntax for such a manipulation, and where can I find documentation on the subject?

Thanks,
Eyal

Hi @Eyal,

At this time, we do not support JavaScript string methods for table format or aggregation manipulations.

The correct approach within the table format is to use data model field names exactly. You cannot extract the first initial from the firstName field using that method at this time. The data must exist already in a field in the Agent table if you would like to display it in the table format.

If you wish, you can request a new feature to add support for it in the New Feature Requests category!