Вопрос

Is there a different way to join/concatenate values from 2 single line columns into a 3rd column other than the way below?

{
    "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
    "elmType": "div",
    "txtContent": "=[$Text1] + ' and ' + [$Text2]"
}

I do not want to use a calculated column for this.

Columns are Text1, Text2 and Text3 is the one being formatted.

Это было полезно?

Решение

Yep, your alternative to an inline expression is this for concatenating values:

{
  "elmType": "div",
  "txtContent": {
    "operator": "+",
    "operands": [
      "[$Duration]",
      " ",
      "[$DurationUnits]"
    ]
  }
}

or also

{
    "elmType": "div",
    "txtContent": "=[$Duration] + ' ' + [$DurationUnits]"
}

Output (example):

8 hour(s)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top