web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need the text value fr...
Power Automate
Unanswered

Need the text value from a lookup table GUID in Dynamics 386 CRM using the When a row is selected (legacy) connector

(0) ShareShare
ReportReport
Posted on by 12

Hi There

 

I am trying to extract data from Dynamics 365 CRM dataverse, using the 'When a row is selected' trigger, and save it into a Sharepoint list, but I am struggling to get certain lookup data into the format that I want. I want the text values to pull through and not the GUID value. 

 

All the assistance I have found online only uses the 'Get a row by ID' trigger and this is not want I want as I dont want to have to copy rows of records into my SP list by creating a new flow using each rows ID. 

 

I have tried putting my lookup field into compose and initialize variables using the code from the help I have found online, 
"_mylookup_value@OData.Community.Display.V1.FormattedValue", but this doesnt seem to work with the 'When a row is selected' trigger.

 

All my non-lookup data is pulling into my SP list perfectly with this flow. The Client field is the lookup column in the CRM table that I want in text value, see below image:

 

Emmavr8_0-1694081798476.png

 

I have spent days trying to figure this out with no luck so any assistance to resolve would be greatly appreciated!!!

Categories:
I have the same question (0)
  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Can you run the flow and show the output values of "When a record is selected" so that I can see the format of the outputs?

     

     

  • Emmavr8 Profile Picture
    12 on at

    Hi @wskinnermctc 

     

    Yes sure, after running the flow, the below are the outputs from the trigger 'When a record is selected':

     

    {
    "body": {
    "entity": {
    "@odata.etag": "hwohyuoerwyoug"",
    "stx_projectnumber": "03905",
    "stx_dateoffirstinquiry": "2023-09-04T00:00:00Z",
    "_stx_clientparent_value": "ef38e0ba-b8dc-ea11-a81a-000d3ab1141c",
    "opportunityid": "fe9516e4-c54b-ee11-be6e-000d3ab0bc8b"
    }
    }
    }

     

    I'm not sure if you want the header outputs as well?

     

    The output of _stx_clientparent_value is what is giving me the GUID and not the text value.

     

    I look forward to hearing from you. Thanks so much.

  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at

    Hello @Emmavr8 

     

    What I don't understand in your first post is

     

    "All the assistance I have found online only uses the 'Get a row by ID' trigger and this is not want I want as I dont want to have to copy rows of records into my SP list by creating a new flow using each rows ID. "

     

    There is not "Get a row by ID" trigger. There is an action with this name and I'm pretty sure that this action should be the first step in your flow (after your current trigger). There you put in the table and the row-id you get from the trigger and you will have all the information you need to create your item. You wouldn't create any new flows or items or other stuff.

  • Emmavr8 Profile Picture
    12 on at

    Hi @Matthy79 

     

    Thanks for your message. You are right, the 'Get a row by ID' isn't a trigger but an action. In all the help , it is used after the 'Manually trigger a flow' trigger, but I do not want to manually trigger the flow if possible.

     

    The issue is there are about 100 rows that I want to copy into my SP list and as I understand, I would manually have to get the row ID for every single row to copy it into the SP list using the 'Get a row by ID' action? I thought that the "When a record is selected"' trigger would automatically get the ID of the row I selected in Dynamics CRM and then import this data to the SP list using 'Create Item' SP action.

     

    The "When a record is selected"' trigger works fine for this purpose for all data types expect for lookup columns where it only copies the GUID, which as I understand should be linked to the selected item's ID anyway?

    Sorry I am still new to using Power Automate.

  • Emmavr8 Profile Picture
    12 on at

    Hi @Matthy79 

     

    I was being so silly!!! I completely forgot that I didnt have to add each rows ID manually because I could use the dynamic content from the "When a record is selected" trigger in the "Get a row by ID" action and then initialize the variable with the @OData.Community.Display.V1.FormattedValue to get the text value instead of the GUID. Flow below:

     

    Emmavr8_0-1694165340123.png

    This works perfectly now, thanks very much for your help!!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard