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 Apps / polymorphic lookups
Power Apps
Unanswered

polymorphic lookups

(0) ShareShare
ReportReport
Posted on by 320

I have an approval board in a gallery and I need to get the approver of each application

I think it is with the owner of the Approval request entity but I don't know how to get it, it tells me that I have to give a polymorphic lookups

can someone help me with the formula

Categories:
I have the same question (0)
  • hnguy71 Profile Picture
    347 on at

    do you have more than one entity associated with the owner field? You'll likely need to use the functions IsType and AsType to properly display the owner field

  • octaking Profile Picture
    320 on at

    Hi @hnguy71 

    thanks for answering

     

    I have a gallery that consumes a CDS entity called approvals. I want to get the Owner field, can you give me a guide please

  • hnguy71 Profile Picture
    347 on at

    you're using only 1 CDS called Approvals? It shouldn't ask for a polymorphic lookup. Are you using another CDS elsewhere with the same field name?

  • octaking Profile Picture
    320 on at

    Hi @hnguy71  the owner is in an entity called users

  • v-xida-msft Profile Picture
    on at

    Hi @octaking ,

    Based on the needs that you mentioned, I think the AsType function and Users Entity could achieve your needs.

     

    On your side, you need to add Users Entity as data source within your app firstly. The Screenshot as below:2.JPG

    Within your Gallery, set the Text property of the Label to following:

    AsType(ThisItem.Owner, [@Users]).'Full Name'

    or

    "Owner: " & AsType(ThisItem.Owner, [@Users]).'Full Name'

    Please consider take a try with above solution, check if the issue is solved.

     

    Please check the following blog for more details about the polymorphic lookups:

    https://powerapps.microsoft.com/en-us/blog/owner-customer-and-regarding-for-canvas-apps/

     

    Best regards,

  • PavanKumar Profile Picture
    479 on at

    Hi,

    This is how you can get values from polymorphic lookups.

     

    //this example is for embedded canvas app so instead of modeldrivenformintegration use relevant name.

    If(IsType( [@ModelDrivenFormIntegration].Item.’Company Name’, [@Accounts] ), AsType([@ModelDrivenFormIntegration].Item.’Company Name’, [@Accounts] ).’Account Name’, AsType( [@ModelDrivenFormIntegration].Item.’Company Name’, [@Contacts] ).’Full Name’ )

    For total details please refer to the blog: https://pavankumargarlapati.wordpress.com/2019/08/06/embedded-canvas-app-how-to-get-the-selected-polymorphic-lookup-field-value/

     

    If this answers your question please mark it as verified

    Regards,

    Pavan Kumar Garlapati

  • Shawn Akins Profile Picture
    4 on at

    where would we put this and what relevant name would we use instead of modeldrivenformintegration?

     

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard