Skip to main content
Community site session details

Community site session details

Session Id : 1evu4xkxTa4KGo0m3EWPST
Power Apps - Microsoft Dataverse
Answered

Model driven Lookup on calculated column

Like (0) ShareShare
ReportReport
Posted on 26 Jan 2021 17:26:32 by 29

I am attempting to Lookup on a Parent calculated column.  It works in a very odd way.  In one instance it brings in the locally defined field (of the calculated column) in the parent table but not on the looked-up field in the parent.  In another case the parent table shows as a popup table but when a record is selected no data is copied into the child field.  In another case  where the parent calculated field is composed of two lookup fields no popup table shows at all.

 

Is it possible to lookup to a parent calculated field?

  • cshinneman Profile Picture
    29 on 28 Jan 2021 at 17:00:05
    Re: Model driven Lookup on calculated column

    Eric, This did the job. Thank you... I had been going round and round with this for over a week!

  • cshinneman Profile Picture
    29 on 28 Jan 2021 at 01:44:15
    Re: Model driven Lookup on calculated column

    Ah... I am sure you are onto something here... I will do some testing...  Thanks Eric!

  • cshinneman Profile Picture
    29 on 28 Jan 2021 at 01:39:51
    Re: Model driven Lookup on calculated column

    I didn't think so.  I have a regular text field that contains a calculated field from a parent 1 entity.  Or does any field that "points to" a calculated field considered a calculated field?  Now that calculated entity is pointing to a parent 2 entity but it it not a calculated field.  So in the string of connected tables there is only one "calculation" per se.

     

    Assuming what I am doing cannot be done, how do I get around this limitation?  Is there any way I can get access to the alternate keys?   I have to imagine projects routinely need cascading far deeper than I am trying to go.

     

    Thanks Fubar

  • Verified answer
    EricRegnier Profile Picture
    8,714 Most Valuable Professional on 28 Jan 2021 at 01:33:19
    Re: Model driven Lookup on calculated column

    Thanks for the video, that really helped. So you're issue is actually not with the calculated fields/columns, but with the tables/entities data. I've summarize them with a solution below:

    1. Every table has a primary field/column. The purpose of the primary field is promote a field that will be displayed in the header of its table's forms, and most importantly in lookups of referencing tables. We need a primary field because otherwise what would be shown in lookups, the ID (GUID)? But that wouldn't be very user-friendly. This is the MS docs definition:
      "By default, every table contains a Primary Field, which is used by lookup columns when establishing relationships with other tables. Typically the primary column stores the name or primary description of the data stored in the table. You may update the name and display name of the primary column before saving the table for the first time. Also, observe that the primary column also has its own Name box, which functions similarly to the table name described above. The primary column name is autopopulated when a display name is entered, uses the same prefix as the table, and cannot be changed after the table is created."

      You don't have data in those primary field and it's the reason why you see "(no name)" and why it seems that the calculated fields do not work. It does calculate in the background but the field is an empty string so there's nothing to concat.
      A common solution is to auto-populate that primary field with the desired value from another field. Suggest to use classic workflows to have it sync but if you need async leverage Power Automate.

    2. The reason you see values in the lookup dropdown is because the lookup on the form is bound to a view with columns that has data and does not contain the empty primary field.
      A solution for the other lookups is to update that view (typically the lookup type of view) or create a new view and associate it to the lookup field.
      More info: https://docs.microsoft.com/powerapps/maker/model-driven-apps/form-designer-add-configure-lookup 
      2021-01-28_14-21-29.png

    Hope this all makes sense!

  • Fubar Profile Picture
    8,027 Super User 2025 Season 2 on 28 Jan 2021 at 01:18:52
    Re: Model driven Lookup on calculated column

    If I a understanding what you are attempting to do correctly, I think you are trying to break one of the limitations:

     

    A calculated field can’t contain a calculated field from another entity that also contains another field from a different entity (spanning three entities): (Current Entity)Calculated Field <- (Parent Record) Calculated Field 1 <- (Parent Record) Calculated Field 2.

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/define-calculated-fields#calculated-fields-considerations

  • cshinneman Profile Picture
    29 on 27 Jan 2021 at 16:56:29
    Re: Model driven Lookup on calculated column

    Was just testing the table view and it is connected to the parent record, it just doesn't display it, shows a "(No Name)" but if clicked on to show the Parent it displays the correct parent record.

  • cshinneman Profile Picture
    29 on 27 Jan 2021 at 16:48:41
    Re: Model driven Lookup on calculated column

    I am attaching a little video that shows how it is working. 

     

    If we could use alternate keys it would be soo much easier.

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on 27 Jan 2021 at 03:56:24
    Re: Model driven Lookup on calculated column

    That’s weird. Just to try to isolate the issue, crd24_employee and crd24_skillspeciality are both text columns that contain values? Also, doesn’t work on a model-driven form but can you see the data in an entity/table view or via Advanced Find?

  • cshinneman Profile Picture
    29 on 27 Jan 2021 at 03:44:10
    Re: Model driven Lookup on calculated column

    this is the expression:

    Concat(crd24_employeefullname.crd24_employee, "-", crd24_skill.crd24_skillspecialty)

     

    this expression works fine.  It is the Form that references this column this is not working properly.

     

    Thanks,

     

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on 27 Jan 2021 at 02:50:00
    Re: Model driven Lookup on calculated column

    You should be able to reference a calculated column in another calculated column (up to 5). Can you paste your calculated expression?

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Featured topics