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 / How to Auto populate v...
Power Apps
Unanswered

How to Auto populate value in a form field based on value of lookup column in a model driven App

(0) ShareShare
ReportReport
Posted on by 90

I have a dataverse table  CnbTable with Columns Place (lookup column) and CnBOfficer(Lookup Column),

I have another table AssignCNB with columns Year , Location (lookup) , CnBUser(Text feild), I  have to create a form in my model driven app where if I select Location as Bangalore it should auto populate CnBOfficer of that place  in CnbUserText Field .

 

How do I achieve this in a model driven app 

Nida_Sayedi_0-1687945112618.png

 

Categories:
I have the same question (0)
  • Linn Zaw Win Profile Picture
    2,996 on at

    To achieve that, you need to write JavaScript on the AssignCNB form.

    The script should trigger onChange of the Location (lookup) fields and if it contains data, 

    • Xrm.WebApi.retrieveMultipleRecords call to CnbTable 
      • $filter <<Place>> eq <<GUID of Location>>
      • $expand <<CnBOfficer>> ($select=<<Name Column>>)
    • Take the data from the first array object and populate it to the CnBUser(Text feild)

     

     

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!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard