Skip to content
  • Wed. Mar 29th, 2023
    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
    • Forum
    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:

    • WhatsApp
    • Email
    • More
    • Tweet
    • Mastodon

    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

    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

    Managing high volumes of flow runs within Power Automate using Power Apps

    Mar 9, 2023 Pieter Veenstra
    Microsoft Office 365

    Calculate progress of tasks in SharePoint using Power Automate

    Feb 22, 2023 Pieter Veenstra
    Microsoft Office 365 Microsoft SharePoint Microsoft SharePoint Online

    Applying site designs failing to apply the site design to SharePoint

    Feb 1, 2023 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,331 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
    • Get your Microsoft Teams One on One chats with Power Automate using the Graph API
    • Fetch Xml vs Filter Queries in Power Automate
    • Query Excel tables using Power Automate
    • Managing high volumes of flow runs within Power Automate using Power Apps
    • Calculate progress of tasks in SharePoint using Power Automate
    Archive
    Thank you for visiting SharePains

    You missed

    Microsoft Graph Microsoft Power Apps Microsoft Power Automate

    Get your Microsoft Teams One on One chats with Power Automate using the Graph API

    Mar 17, 2023 Pieter Veenstra
    Microsoft Power Automate

    Fetch Xml vs Filter Queries in Power Automate

    Mar 16, 2023 Pieter Veenstra
    Microsoft Power Automate

    Query Excel tables using Power Automate

    Mar 10, 2023 Pieter Veenstra
    Microsoft Office 365

    Managing high volumes of flow runs within Power Automate using Power Apps

    Mar 9, 2023 Pieter Veenstra
    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: