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 / Auto populate a column...
Power Apps
Unanswered

Auto populate a column based on a lookup?

(0) ShareShare
ReportReport
Posted on by 129

So, I have a table with peoples names and departments, I have another table where we assign tasks to those people, I made an app to assign the tasks, but I would like to make it so that the department is automatically written on the new record based on that person's department from the employee table. I have a lookup on the task table to the employee table, but the department field has to be manually marked, is there a way to this automatically?

I have the same question (0)
  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @FGRODRIGUEZ , 

     

    You can do this a number of ways.  I normally would utilize a real-time workflow to populate the data right away on Create or on Change of that field on the table.  In the workflow you can do an update step and reference through to the lookup field and grab the department and set it on the record.  

     

    A couple more options:

    1.  Might be able to utilize a Calculated field that could refer to the field from the User / Department table but there are limited supported types within calculated fields.

    2.  Another option (still in preview) is PowerFX formula column to pull in this value from the related entity.  Again, check types and applicability...

    3.  Power Automate could execute and update this value based on the create / update of the record.

     

     

    Another thing you can do which is actually "not" bringing into the record is you could to the following:

    1.  Create a View that shows the related field from the User for the Department in all list views of your rows.

    2.  Create a Quick View form for the User table that shows the Department and then add this quick view form to the task form to see the department.

     

    The advantage of this approach is if the Department of the user changes on the first table it will not have to try and update all related tasks with this updated value.  This is key because the data would get out of sync (unless you are trying to track at time of creation only).

     

  • Fubar Profile Picture
    8,338 Super User 2025 Season 2 on at

    For a Model Driven App, as you have lookups on both records, if only needed for create actions from the UI then also could consider:

    • Relationship Mapping (used to pre-populate fields down from the parent record, but this is only client side)
    • if relationship mapping is not available, then you can also do via client side script (JavaScript)

     

  • kylrntglr Profile Picture
    8 on at

    Do you have an example of the JS code that allowed you to grab variables? Mine is not working, thanks!

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