سؤال

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