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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / prepopulating fields i...
Power Apps
Suggested Answer

prepopulating fields in new related record (Model-Driven app field mapping)

(1) ShareShare
ReportReport
Posted on by 17
Hi,
 
Scenario:
A Vacancy table containing fields like [salary], [manager] and [job title].
When a vacancy is filled, users either select or create an Employee record for the successful candidate from the Vacancy record.
Relationship: Vacancy N:1 Employee 
(because a vacancy can only be filled by 1 employee (existing or new), but an employee can apply to multiple vacancies and change role internally)
 
Obviously, the aim is to avoid typing in [Job Title]/[Manager]/[Salary] again when creating a new Employee record from the Vacancy record.
An Employee sub-grid on the Vacancy form would be inadequate/poor design, as there would only ever be 1 staff taking on the job, so an Employee lookup makes more sense.
 
When field mapping from one table to the other, I couldn't find a way to make Vacancy the source and Employee the target.
The only direction was Employee to Vacancy, which is no use at all, since the Vacancy record comes first.
 
I followed field mapping guidance from this helpful blog (Bonus Tip 3) to pre-populate fields when creating a record in a related table, but it looks like:
 
1) lookup columns might not be suitable for the Field Mapping method, even though they do generate a relationship between tables
2) it only works when the source used to populate the related record is on the 1 side of a 1:N relationship, but not the other way around?
 
 
 
I must have missed something
Thanks in advance
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi
     
    Can you please at the top, clearly explain your issue and your ask. Please don't point at a video and then just start talking. We aren't going to watch that thing :-) no one is.
     
     
  • LindaCz Profile Picture
    17 on at
    Not a video, but an article explaining Field Mapping to highlight what has already been tried without repeating the whole content and making the question so long no one would read, @FLMike.

    I am not expecting anyone to click through & read, that's why I screenshot the key piece of info from it, on top of flagging the two issues arising from Field Mapping...

    Have now put scenario first, resource material last if it can stop comments about format rather than content.
    I wasn't after an editor, but someone who knows about field mapping and its limitations ;)


  • Suggested answer
    Jonathan Manrique Profile Picture
    2,695 on at
    Hi 
     
    Mapping only works in 1:N relationship when your table A is the parent and B is your child table.
    In this case, it also works only when you create it inside table A in a Subgrid that takes you to a new record in table B.
    For it to work the other way around, you must have code that is no longer mapping.
     
     
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    You can accept more than one post as a solution
    Follow me on Linkedin, I talk about Power Platform
    www.linkedin.com/in/jonathan-manrique-rios
     
  • LindaCz Profile Picture
    17 on at
    Many thanks for confirming, @Jonathan Manrique,
    I suspected this would be the case, but was keeping my fingers crossed a whiz out there had found a workaround.
     
    The only option to get this to work would be custom Javascript?
  • Suggested answer
    Jonathan Manrique Profile Picture
    2,695 on at
    Hi
     
    No, there can be two or three methods to make it work depending on how you want it to work on the front or backend
    You can pull the front end with Javascript, or the backend with Power Automate or .NET Plugin by making a plugin
     
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    You can accept more than one post as a solution
    Follow me on Linkedin, I talk about Power Platform
    www.linkedin.com/in/jonathan-manrique-rios
     
  • BhargavPatel Profile Picture
    660 Moderator on at
    I found this post that shows how to achieve what you are looking for using JavaScript. You can also use session storage instead of local storage, so the values are removed when the browser tab is closed. However, if a timely removal of the stored value is not performed, it can lead to erroneous values in the parent form. 
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard