In Power automate sometimes we need to pick the Name Text of the lookup field. When we assign directly it will give you the GUID so we have to do some tasks.

If you get the output body you can see for every look up control we have five tags in the output.

For example in Lead table if we want to fetch Source Campaign which is a lookup field to campaign table then the output of the power automate step will give below tags.

First code displays Text/name.

“_campaignid_value@OData.Community.Display.V1.FormattedValue”: “Direct marketing”

Second code displays field name.

“_campaignid_value@Microsoft.Dynamics.CRM.associatednavigationproperty”: “campaignid”

Third code displays target table name.

“_campaignid_value@Microsoft.Dynamics.CRM.lookuplogicalname”: “campaign”

Fourth code displays type of field and fifth code displays the GUID. 

“_campaignid_value@odata.type”: “#Guid”

“_campaignid_value”: “d68571f5-88df-e311-b8e5-6c3be5a8b200”,

So whenever we assign campaign to a field it displays GUID.

Now if we want to display the name of a lookup field use the below code. If the lookup field name is “campaignid” the the code to display text is given below.

_campaignid_value@OData.Community.Display.V1.FormattedValue

Now I have used below code in my power automate variable to display campaign name.

For my case I am using below code.

outputs(‘Get_a_row_by_ID’)?[‘body/_campaignid_value@OData.Community.Display.V1.FormattedValue’]

 

So this will give you the text of lookup field. Hope this help

For any Help or Queries Contact us info@crmonce.com or +918096556344