Hi people
I am trying to build a flow that creates a List with items
There is a column of type Choice , with a custom format defined in the Flow
I have a variable called "CustomFormatStatus" of type "String" defined like this:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"attributes": {
"class": "=if(@currentField == 'Approved', 'sp-field-severity--good', if(@currentField == 'Not Selected', 'sp-field-severity--warning', if(@currentField == 'Not Approved', 'sp-field-severity--blocked', 'sp-field-severity--blocked'))) + ' ms-fontColor-neutralSecondary'"
},
"children": [
{
"elmType": "span",
"style": {
"display": "inline-block",
"padding": "0 4px"
},
"attributes": {
"iconName": "=if(@currentField == 'Done', 'CheckMark', if(@currentField == 'In progress', 'Forward', if(@currentField == 'In review', 'Error', if(@currentField == 'Has issues', 'Warning', 'ErrorBadge'))))"
}
},
{
"elmType": "span",
"txtContent": "@currentField"
}
]
}
Then below I have inserted this JSON in the HTTP Request like this:
And then when i run the flow , i get the following error:
I have tested the JSON in a test list and the formatting is applied correctly when the value changes, so i cannot really figure out what the problem is here.
Thank you in advance.