Managed Metadata Multivalue Object contains space in front of label and value

Regular Contributor

In Microsoft Flow when I use the sharepoint get items action, when it retreives a managed metadata multivalue field it put a space in front of the label and value properties of each json object in the array. However the first object in the array is ok (no space). When I try to validate if a term object exists in an array of terms object, it does not work as the extra space makes the json objects not equals.

 

Anyone aware of this? 

 

 

"udlEpmBusinessUnit": [
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy",
"TermGuid": "71570a5e-b304-4992-9f13-af6e0381767b",
"WssId": 26,
"Label": "Australia", ===> NO SPACE IN FIRST OBJECT
"Path": null,
"Value": "Australia|71570a5e-b304-4992-9f13-af6e0381767b" ===> NO SPACE IN FIRST OBJECT
},
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy",
"TermGuid": "647ad695-cf56-4ab0-8983-7f925366c26e",
"WssId": 25,
"Label": " Canada-Drummondville"====> SPACE 
"Path": null,
"Value": " Canada-Drummondville|647ad695-cf56-4ab0-8983-7f925366c26e" ====> SPACE 
},
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy",
"TermGuid": "58103bf8-f4cb-4a32-85ad-8ba97cfbd2f0",
"WssId": 29,
"Label": " United Kingdom"====> SPACE 
"Path": null,
"Value": " United Kingdom|58103bf8-f4cb-4a32-85ad-8ba97cfbd2f0" ====> SPACE 
},
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy",
"TermGuid": "bdcf0db6-1622-4caa-b6b5-df47f7ca8c17",
"WssId": 30,
"Label": " United States"====> SPACE 
"Path": null,
"Value": " United States|bdcf0db6-1622-4caa-b6b5-df47f7ca8c17" ====> SPACE 
}
],
 
 
No issue with single value managed metadata column
 
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy",
"TermGuid": "647ad695-cf56-4ab0-8983-7f925366c26e",
"WssId": 25,
"Label": "Canada-Drummondville", ===> NO SPACE IN FIRST OBJECT
"Path": null,
"Value": "Canada-Drummondville|647ad695-cf56-4ab0-8983-7f925366c26e"
}
2 Replies
Sorry, I found why. When I select multiple terms in the term picker, it add a space between each term. Surely why I have these blank spaces. I guess the terms picker should remove the spaces between each selected terms....
How did you compensate for the spaces? I'm running into this also. I created a multiple step process to parse spaces, but would be interested if you found a simpler solution.