💡Tips: Get "DisplayName" of the Lookup field on Power Automate

#PowerAutomate, #OData, #LookupFiled

Recently, I have leveraged Power Automate to retrieve a list of new deals and then sent this list to the Sales Owner.

In practice, I encountered difficulties when attempting to retrieve the Account name and Primary Contact name, both of which are lookup fields, from the Deals entity.

1st attempt - Using Dynamics Content

I used the value in Dynamic content (OOB dynamics field content of Power Automate)

Dynamics contentResult
  • Account (Value): Get record GUID

  • Account (Type): Get the entity name

  • Account (Value): fdf6a531-.....

  • Account (Type): account

... first try, I failed to get the display name with the OOB dynamic content field of the Power Automate.

2nd attempt - Using Expression

Then, I used Expression to create the formula and get the Display Name of Account lookup field.

---

Initially, when displaying all attributes of the Deal entity and then applying a filter on the lookup field "Account" (ntd_account_id), I discovered exciting aspects.

I observed the first value is the "Display Name" of the Account field, I promptly accessed Power Automate and employed the mentioned attribute in my expression.

//The expression:
item()?['_ntd_account_id_value@OData.Community.Display.V1.FormattedValue']

... And checking now:

Thank you for reading & Hoping well... 🎉 [NTD]yns.asia ...invite me a cup. Thank you. ❤️

Last updated