display JSON data as concatenated values

Olsztyniak
Tera Expert

I am working on the case where one of the fields stores JSON data.
As an example let's use { 'first_name': 'John', 'last_name': 'Doe' }.
The default processing of the string field will display just that,
How can I alter how that data is displayed so it shows 'Doe, John'  ?

1 ACCEPTED SOLUTION

No, it can't. But you could also implement a custom formatter. The downside of that approach is, that this formatter only works in the form view of the Classic UI. Not in the list view and not in other UIs like Service Portal, Mobile Apps and Workspaces.
However, such a calculated field is not rocket science. A prominent field is the "name" column in the sys_user table, which concatenates the first name and the family name of a user.

View solution in original post

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Unfortunately this is not possible. You have to create another field as calculated field which takes the content of the original field and builds the required output from the JSON.

Olsztyniak
Tera Expert

Can the form have a field that is not mapped to the table's column?

No, it can't. But you could also implement a custom formatter. The downside of that approach is, that this formatter only works in the form view of the Classic UI. Not in the list view and not in other UIs like Service Portal, Mobile Apps and Workspaces.
However, such a calculated field is not rocket science. A prominent field is the "name" column in the sys_user table, which concatenates the first name and the family name of a user.