Forum Discussion

RFulton's avatar
RFulton
Copper Contributor
Dec 06, 2024
Solved

SharePoint List Flow - Displaying Unique ID

I have create a flow to populate a word document and email the user. It is working great, except certain fields the word document populates with the Sharepoint unique ID string. How can I get this formatted to use just the text in that field?

  • In your Flow, when you're pulling data from the SharePoint list, add a Compose action right after getting your list item. This will help format the text before it goes into your document.

    For a single line of text field, use this expression:

    body('Get_item')?['TextFieldName']

    For a multiple lines of text field, use this expression:

    body('Get_item')?['MultiLineFieldName']

    For a number field, use this expression:

    body('Get_item')?['NumberFieldName']

    For a date/time field, use this expression:

    body('Get_item')?['DateFieldName']

    Place this Compose action between your "Get Item" and your "Create Word Document" steps. Then, when you're setting up your Word document template, use the output from the Compose action instead of directly using the SharePoint field.

    This gives you just the clean text without all the extra SharePoint ID information that usually comes with it. The Compose action basically acts as a filter, stripping away everything except the text you actually want to see in your document.

3 Replies

  • HaidariHammad's avatar
    HaidariHammad
    Copper Contributor

    Please export your solution in Power Automate as a package and attach it here. Additionally, take a screenshot of the columns from your list settings and include it here as well. I’ll review the details and see how I can assist you in resolving this issue.

    https://learn.microsoft.com/en-us/power-automate/export-import-flow-non-solution

  • RFulton's avatar
    RFulton
    Copper Contributor

    HaidariHammad 

    Apologies for the late response, I am new to Power Automate and one of the Sharepoint list that I have has multiple columns, and some of those column has different columns inside of them. When I try to reference the body('Get_items')?['MultiLineFieldName'] with the name of the main column it just returns the body('Get_items')?['MultiLineFieldName'] in the Word Document. I have been trying to research this issue while working with your suggestion. I have tried using a Parse JSON to filter out as well. My flow is manually triggered by a button, Maybe I am doing something wrong here

    Any help is appreciated.

  • HaidariHammad's avatar
    HaidariHammad
    Copper Contributor

    In your Flow, when you're pulling data from the SharePoint list, add a Compose action right after getting your list item. This will help format the text before it goes into your document.

    For a single line of text field, use this expression:

    body('Get_item')?['TextFieldName']

    For a multiple lines of text field, use this expression:

    body('Get_item')?['MultiLineFieldName']

    For a number field, use this expression:

    body('Get_item')?['NumberFieldName']

    For a date/time field, use this expression:

    body('Get_item')?['DateFieldName']

    Place this Compose action between your "Get Item" and your "Create Word Document" steps. Then, when you're setting up your Word document template, use the output from the Compose action instead of directly using the SharePoint field.

    This gives you just the clean text without all the extra SharePoint ID information that usually comes with it. The Compose action basically acts as a filter, stripping away everything except the text you actually want to see in your document.

Resources