Bhubaneswar, Odisha, India
+91-8328865778
support@softchief.com

Get text or name value of lookup field in power automate in power apps

Get text or name value of lookup field in power automate in power apps

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 tweaks.

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.

"_campaignid_value@OData.Community.Display.V1.FormattedValue": "Direct marketing",
"_campaignid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "campaignid",
"_campaignid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "campaign",
"_campaignid_value@odata.type": "#Guid",
"_campaignid_value": "d68571f5-88df-e311-b8e5-6c3be5a8b200",

The first code displays Text/name, second code displays field name, third code displays target table name, fourth code displays type of field and fifth code displays the GUID. 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