web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

[Model Driven APP] - Record keep the old values from lookup column

(0) ShareShare
ReportReport
Posted on by 38

Hello,


I have entity called HC Reports with the following structure:

No.Col (primary key)HC Country (text)HC Function (text)
1233FRANCEHUMAN RESOURCES
2343FRANCEENGINEER


And other entity called Report with the following structure:

ReportIDHC Report (lookup to HC Reports)HC Country (HC Report)HC Function (HC Report)Date
13231231233FRANCEHUMAN RESOURCES01/08/2023
2342342343FRANCEENGINEER01/08/2023

 

Every month the HC Report entity is updated and some HC Functions could be updated with new values.

The report data is created for each month, but every time a record from HC Reports updates the value, the reference used in Report entity is updated, that's a normal behaviour in DataVerse.

 

I need the records from Report keep the previous values from the HC Reports lookup column and only the new added records use the new/changed values from the lookup.
Is it possible to achieve this?

Thank you,
Ruben

I have the same question (0)
  • gulshankhurana Profile Picture
    1,397 Moderator on at
    Re: [Model Driven APP] - Record keep the old values from lookup column

    Hi @Tea_Programmer 

     

    If you would like to keep the values as originally entered then you'd need to store those values locally in the Report table.

    For this, you'd first need to create the fields/columns (with like-for-like field/column types) in the Report table for which you want the old values to be retained. You can set the fields to be read-only if you don't intend to update them in the Report table.

    You can then create a Power Automate flow that copy-pastes the values from HC Reports to Report table. You'd need to think of a trigger that'd make the flow run only once. 

     

    I hope this information helps.

     

    Kind regards

    Gulshan

    -----------------------------------------------

    Please give a Thumbs Up to my reply if you appreciate my effort. If it helps resolve your query then please accept my reply as a solution.

  • Fubar Profile Picture
    8,319 Super User 2025 Season 2 on at
    Re: [Model Driven APP] - Record keep the old values from lookup column

    The reference does not actually change, the internal GUID in the Lookup will be the same.  Lookup fields are linked/referenced by the internal GUID of the record - what is displayed to the user is the current value of the Primary Name column on the record with that GUID. - hence if you are changing the value on the lookedup record that is what is displayed to the user.

     

    If you want to save a historic display value, you will need to copy that value to a text field.  If you do this, you just need to be mindful of if there are scenarios where the Lookedup record is updated and you need that change updated in your text field.

  • Tea_Programmer Profile Picture
    38 on at
    Re: [Model Driven APP] - Record keep the old values from lookup column

    Hi @Fubar ,

    I was thinking of another solution involving Relationship mapping.

    In the relationship that joins the two tables using HC Report (lookup to HC Reports). I created two more mappings for HC Country and HC Function.
    I followed the example from this site: https://meganvwalker.com/tips-tricks-in-model-driven-power-apps/#bonus_tip_3

    In the Reports table I created two more columns exactly the same as HC Country and HC Function, supposedly when I change a lookup value (HC Report) these fields should change since they are connected with the mapping, right? But for some reason this feature does not work.

  • Fubar Profile Picture
    8,319 Super User 2025 Season 2 on at
    Re: [Model Driven APP] - Record keep the old values from lookup column

    You need to remember that relationship mapping does not work for all scenarios.  Generally it is a client side operation and so doesn't apply to server side operations e.g. data import, creating records from Flow, Workflow, or Plugin

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 803 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 314 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 253 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics