Create one line joined from few detail fields and strings inside data mapper

Hello OL masters.

I have question after some long break of working with Connect.

Have data mapper with detail. Inside data mapper I add some field.
Inside this field I would like to join few fields inside including string slashes like this:

Field1(Field2)/Field3/Field4

Later I would like use joined line inside detaiL TABLE inside the template section.

Two questions:

  • How i can get Field1 value from JS inside java script field of data mapper?
  • Is this also possible inside template where I have for example:
    <tr data-repeat="detail">
        <td style="text-align: left;" data-field="Field1">@Field1@</td>
        <td style="text-align: left;" data-field="Field2">(@Field2@)</td>
        <td style="text-align: left;" data-field="Field3">@Field3@</td>
        <td style="text-align: left;" data-field="Field4">@Field4@</td>
    </tr>

So can I somehow join this 4 fields using strings inside template?

Thank You for any help
Odyn

Hello Odyn,

Can you provide an anonymized example of your data with precision of which part of it you want to concatenate?

Hello Hamelj

We already solved this by adding multuple spans inside one

Thanks

FYI. In 2023.1 or later one could simply add multiple expressions to the table cell.

<tr data-repeat="detail">
        <td>{{Field1}}({{Field2}})/{{Field3}}/{{Field4}}</td>
</tr>

Alternatively create a custom expression using a Text Helper and do the concatenation there. In that case you can use a shorter expression, for example: {{myFields}}.

See also: