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

%3CLINGO-SUB%20id%3D%22lingo-sub-672805%22%20slang%3D%22en-US%22%3EManaged%20Metadata%20Multivalue%20Object%20contains%20space%20in%20front%20of%20label%20and%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-672805%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20Microsoft%20Flow%20when%20I%20use%20the%20sharepoint%20get%20items%20action%2C%20when%20it%20retreives%20a%20managed%20metadata%20multivalue%20field%20it%20put%20a%20space%20in%20front%20of%20the%20label%20and%20value%20properties%20of%20each%20json%20object%20in%20the%20array.%20However%20the%20first%20object%20in%20the%20array%20is%20ok%20(no%20space).%20When%20I%20try%20to%20validate%20if%20a%20term%20object%20exists%20in%20an%20array%20of%20terms%20object%2C%20it%20does%20not%20work%20as%20the%20extra%20space%20makes%20the%20json%20objects%20not%20equals.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyone%20aware%20of%20this%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%22udlEpmBusinessUnit%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%5B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22%40odata.type%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%23Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22TermGuid%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%2271570a5e-b304-4992-9f13-af6e0381767b%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22WssId%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E26%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Label%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22Australia%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%3E%3D%3D%3D%26gt%3B%20NO%20SPACE%20IN%20FIRST%20OBJECT%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Path%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3Enull%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Value%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22Australia%7C71570a5e-b304-4992-9f13-af6e0381767b%22%26nbsp%3B%3CSTRONG%3E%3CSPAN%3E%3D%3D%3D%26gt%3B%20NO%20SPACE%20IN%20FIRST%20OBJECT%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22%40odata.type%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%23Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22TermGuid%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22647ad695-cf56-4ab0-8983-7f925366c26e%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22WssId%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E25%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Label%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%20Canada-Drummondville%22%3C%2FSPAN%3E%3CSPAN%3E%2C%26nbsp%3B%20%3CSTRONG%3E%3D%3D%3D%3D%26gt%3B%20SPACE%3C%2FSTRONG%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Path%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3Enull%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Value%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%20Canada-Drummondville%7C647ad695-cf56-4ab0-8983-7f925366c26e%22%26nbsp%3B%3CSTRONG%3E%3D%3D%3D%3D%26gt%3B%20SPACE%3C%2FSTRONG%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22%40odata.type%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%23Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22TermGuid%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%2258103bf8-f4cb-4a32-85ad-8ba97cfbd2f0%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22WssId%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E29%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Label%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%20United%20Kingdom%22%3C%2FSPAN%3E%3CSPAN%3E%2C%26nbsp%3B%3CSTRONG%3E%3D%3D%3D%3D%26gt%3B%20SPACE%3C%2FSTRONG%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Path%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3Enull%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Value%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%20United%20Kingdom%7C58103bf8-f4cb-4a32-85ad-8ba97cfbd2f0%22%26nbsp%3B%3CSTRONG%3E%3D%3D%3D%3D%26gt%3B%20SPACE%3C%2FSTRONG%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22%40odata.type%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%23Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22TermGuid%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22bdcf0db6-1622-4caa-b6b5-df47f7ca8c17%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22WssId%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E30%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Label%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%20United%20States%22%3C%2FSPAN%3E%3CSPAN%3E%2C%26nbsp%3B%3CSTRONG%3E%3D%3D%3D%3D%26gt%3B%20SPACE%3C%2FSTRONG%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Path%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3Enull%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Value%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%20United%20States%7Cbdcf0db6-1622-4caa-b6b5-df47f7ca8c17%22%26nbsp%3B%3CSTRONG%3E%3D%3D%3D%3D%26gt%3B%20SPACE%3C%2FSTRONG%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%5D%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3ENo%20issue%20with%20single%20value%20managed%20metadata%20column%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%7B%3CBR%20%2F%3E%22%40odata.type%22%3A%20%22%23Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy%22%2C%3CBR%20%2F%3E%22TermGuid%22%3A%20%22647ad695-cf56-4ab0-8983-7f925366c26e%22%2C%3CBR%20%2F%3E%22WssId%22%3A%2025%2C%3CBR%20%2F%3E%22Label%22%3A%20%22Canada-Drummondville%22%2C%26nbsp%3B%3CSPAN%3E%3D%3D%3D%26gt%3B%20NO%20SPACE%20IN%20FIRST%20OBJECT%3C%2FSPAN%3E%3CBR%20%2F%3E%22Path%22%3A%20null%2C%3CBR%20%2F%3E%22Value%22%3A%20%22Canada-Drummondville%7C647ad695-cf56-4ab0-8983-7f925366c26e%22%3CBR%20%2F%3E%7D%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-672805%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-672832%22%20slang%3D%22en-US%22%3ERe%3A%20Managed%20Metadata%20Multivalue%20Object%20contains%20space%20in%20front%20of%20label%20and%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-672832%22%20slang%3D%22en-US%22%3ESorry%2C%20I%20found%20why.%20When%20I%20select%20multiple%20terms%20in%20the%20term%20picker%2C%20it%20add%20a%20space%20between%20each%20term.%20Surely%20why%20I%20have%20these%20blank%20spaces.%20I%20guess%20the%20terms%20picker%20should%20remove%20the%20spaces%20between%20each%20selected%20terms....%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2270227%22%20slang%3D%22en-US%22%3ERe%3A%20Managed%20Metadata%20Multivalue%20Object%20contains%20space%20in%20front%20of%20label%20and%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2270227%22%20slang%3D%22en-US%22%3EHow%20did%20you%20compensate%20for%20the%20spaces%3F%20I'm%20running%20into%20this%20also.%20I%20created%20a%20multiple%20step%20process%20to%20parse%20spaces%2C%20but%20would%20be%20interested%20if%20you%20found%20a%20simpler%20solution.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
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.