Skip to content
  • Sun. Aug 14th, 2022
    SharePains Logo
    SharePains by Microsoft MVP Pieter Veenstra

    Microsoft 365, Power Platform, SharePoint, Teams, Azure and Dynamics

    • Microsoft Power Platform
      • Microsoft Power Automate
      • Microsoft Power BI
      • Microsoft Power Apps
      • AI Builder
    • Microsoft 365 / Office 365
      • Microsoft SharePoint Online
      • Microsoft Teams
      • Microsoft Office Online
      • OneDrive for Business
      • Microsoft Forms
    • Microsoft Azure
    • Microsoft Dynamics 365
    • About
      • About the Author Pieter Veenstra
      • Contact SharePains today!
      • My Published Articles elsewhere…
      • Privacy Policy
    • Power Platform Ultimate user guides
      • Power Automate, the ultimate user guide!
      • Power Apps, the ultimate user guide
      • Power Pages – The ultimate user guide
    Microsoft Office 365

    SharePoint 2016 – Aaah, SharePoint Designer workflows!

    Avatar for Pieter Veenstra

    ByPieter Veenstra

    Dec 22, 2017

    Over the last year or so I’ve only really looked at the bleeding edge technology released by Microsoft. Microsoft Teams, Microsoft Forms, SharePoint Online, PowerApps and Microsoft Flow  and anything related have been very interesting.

    Just before the 2017 year ends however I’m now working on a SharePoint 2016 project and it’s quite a challenge to go back to technology like SharePoint Designer workflows. Today one of those small problems that can be a bit of a challenge is to get the value of a Managed Metadata column.

    I first went down the root of simply setting a variable to my column

    SharePoint 2016 - Aaah, SharePoint Designer workflows! Microsoft Office 365 locationsimplewrong

    But I bumped quite quickly into the following error as I was setting a string variable to the value of the Managed Metadata column:

    Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.InvalidCastException: The value ‘d/results(0)/Location’ cannot be read as type ‘String’. at Microsoft.Activities.GetDynamicValueProperty`1.CheckedRead(String propertyName, DynamicItem value) at Microsoft.Activities.GetDynamicValueProperty`1.Execute(CodeActivityContext context) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

    Quite quickly I now found:

    https://sharepoint.stackexchange.com/questions/156579/get-metadata-column-value-in-spd-workflow

    So I went throguh these steps:

    1. Choose action – set variable to value

    2. In the value section (popup when you click value)- choose the data source as the list which you are fetching the column from –

    3. In the field from source – choose the managed metadata column internal name

    4. In the find in the list item section – choose the field tp be ID and value to be CurrentItem -> ID (should look like CurrentItem.ID)

    5. Click on OK. This should get you value of the managed metadata column.

    6. If you want, you can use the action Log item to the history list to check the value.

     

    So I change my set variable step into something like this: where I selected my Location column again:

    SharePoint 2016 - Aaah, SharePoint Designer workflows! Microsoft Office 365 setvariable

    But still no luck. Then I tried the Location_0 column, Huh what is this. My internal name of the column is definitely Location and not Location_0

    SharePoint 2016 - Aaah, SharePoint Designer workflows! Microsoft Office 365 locations

    Then I simplified my step again and the Location_0 column did the trick again.

    SharePoint 2016 - Aaah, SharePoint Designer workflows! Microsoft Office 365 locationsimple

    SharePoint 2016 – Aaah, SharePoint Designer workflows!

     

     

     

    Share this:

    • Tweet
    • WhatsApp
    • Email

    Like this:

    Like Loading...

    Related

    Post navigation

    Microsoft Forms – Quizzes the full starters guide, create a quiz
    Microsoft Forms – Reports and quizzes, the full starter guide
    Avatar for Pieter Veenstra

    By Pieter Veenstra

    Business Applications and Office Apps & Services Microsoft MVP working as a Microsoft Productivity Principal Consultant at HybrIT Services. You can contact me using contact@veenstra.me.uk.

    Related Post

    Microsoft Office 365

    What can I do with my Power Automate Licenses?

    Aug 10, 2022 Pieter Veenstra
    Microsoft Office 365

    Azure Application Insights and Error Handling in Power Apps

    Aug 9, 2022 Pieter Veenstra
    Microsoft Office 365

    Boolean logic in Power Apps

    Jul 22, 2022 Pieter Veenstra

    Leave a Reply Cancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Looking for a different post?
    Subscribe to Blog via Email

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 5,238 other subscribers
    Links
    • HybrIT Services HybrIT Services is the consultancy where work as a Microsoft Productivity Principal Architect. If you want to know more about what we do, then please feel free to start a chat. HybrIT Services is the consultancy where work as a Microsoft Productivity Principal Architect. If you want to know more about what we do, then please feel free to start a chat.
    • Formilla Chat Would you like to use the same chat function on your blog or website? Would you like to use the same chat function on your blog or website?
    Recent Posts
    • What can I do with my Power Automate Licenses?
    • Azure Application Insights and Error Handling in Power Apps
    • Boolean logic in Power Apps
    • Secure your SharePoint data in Power Apps using Power Automate
    • Application Lifecycle Management and Power Pages
    Archive
    • August 2022
    • July 2022
    • June 2022
    • May 2022
    • April 2022
    • March 2022
    • February 2022
    • January 2022
    • December 2021
    • November 2021
    • October 2021
    • September 2021
    • August 2021
    • July 2021
    • June 2021
    • May 2021
    • April 2021
    • March 2021
    • February 2021
    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
    • October 2014
    • September 2014
    • July 2014
    • June 2014
    • May 2014
    • April 2014
    • March 2014
    • February 2014
    • January 2014
    • November 2013
    • October 2013
    • September 2013
    • August 2013
    • June 2013
    • May 2013
    • March 2013
    • October 2012
    • May 2012
    • April 2012
    • March 2012
    • January 2012
    • December 2011
    • November 2011
    • August 2011
    • July 2011
    • June 2011
    • January 2011
    • December 2010
    • AI Builder
    • Angular 2
    • Hyper-V
    • Microsoft 365
    • Microsoft Azure
    • Microsoft Bookings
    • Microsoft CRM
    • Microsoft Dataverse
    • Microsoft Delve
    • Microsoft Dynamics 365
    • Microsoft Edge
    • Microsoft Flow
    • Microsoft Forms
    • Microsoft Infopath
    • Microsoft Office
    • Microsoft Office 365
    • Microsoft Office Online
    • Microsoft Outlook
    • Microsoft Power Apps
    • Microsoft Power Automate
    • Microsoft Power BI
    • Microsoft Power Platform
    • Microsoft Project
    • Microsoft SharePoint
    • Microsoft SharePoint Online
    • Microsoft SQL Server
    • Microsoft Teams
    • Microsoft Word
    • Microsoft Yammer
    • MSDN Forum Assistant
    • Nintex Workflow
    • Office web apps
    • OneDrive for Business
    • Patterns And Practices
    • Power Pages
    • PowerShell
    • SharePoint 2010
    • SharePoint 2013
    • SharePoint 2016
    • SharePoint Designer
    • Skype for Business
    • SPFx or SharePoint Framework
    • Technet Forum Assistant
    • Visual Studio
    • Windows 10 Mobile
    • Windows Server
    • WordPress
    • Workflow Manager 1.0
    Thank you for visiting SharePains

    You missed

    Microsoft Office 365

    What can I do with my Power Automate Licenses?

    Aug 10, 2022 Pieter Veenstra
    Microsoft Office 365

    Azure Application Insights and Error Handling in Power Apps

    Aug 9, 2022 Pieter Veenstra
    Microsoft Office 365

    Boolean logic in Power Apps

    Jul 22, 2022 Pieter Veenstra
    Microsoft Office 365

    Secure your SharePoint data in Power Apps using Power Automate

    Jul 21, 2022 Pieter Veenstra
    Sur.ly

    Brilliantly

    SAFE!

    sharepains.com

    Content & Links

    Verified by Sur.ly

    2022
    Community Connect
    Community connect
    ULS Monitor
    ULS monitor
    ULS monitor
    PowerApps4Kids
    PowerApps4Kids
    Power Platform User Group
    Power Apps and Power Automate User Group
    Collab 365
    Collab 365
    SharePains Logo

    SharePains by Microsoft MVP Pieter Veenstra

    Microsoft 365, Power Platform, SharePoint, Teams, Azure and Dynamics

      Theme: Newsup by Themeansar.

      • Facebook
      •  Twitter
      •  LinkedIn
      •  GitHub
      •  Reddit
      %d bloggers like this: