-
Notifications
You must be signed in to change notification settings - Fork 1k
Column formatting forEach property does not support spaces #8891
Copy link
Copy link
Closed
Labels
area:list-formattingCategory: View, row & column formatting with JSONCategory: View, row & column formatting with JSONtype:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Metadata
Metadata
Assignees
Labels
area:list-formattingCategory: View, row & column formatting with JSONCategory: View, row & column formatting with JSONtype:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
Declarative list formatting
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
Its not possible to use operators in the forEach property of column formatting.
The following definition fails with the error message:Failure: split(replaceAll(@currentField,'; is not an array, array expected in the expression value in split(replaceAll(@currentField,'; ',';'),';')
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "debugMode": true, "elmType": "div", "children": [ { "elmType": "div", "forEach": "value in split(replaceAll(@currentField,'; ',';'),';')", "txtContent": "='*'+[$value]" } ] }Content in the field is a semicolon separated list: 1; 2; 3; 4
Spaces can be used in other properties like for example txtContent.
Steps to reproduce
Expected behavior
It should be possible to use spaces in operators in the forEach porperty