Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Pass values from parent lookups to child forms

(2) ShareShare
ReportReport
Posted on by 41
Maybe this is a very novice question but i am struggeling to understand how i can manage the following. 
 
Lets say i have a table setup that looks like this:
  • Country
  • State
  • City
 
I have created the following relations between the tables:
  • Country
  • State -> Country
  • City-> State
  • City - Country
 

When I am in a form for states, I would like to add some cities from a subgrid. When I create them, the state is automatically filled, but the country is not. How can I use the lookup field I created in State → Country to automatically fill the country when adding a city?

I hope I have described it correctly.


Kind regards, 
Arjan
Categories:
  • Verified answer
    Arjan Profile Picture
    41 on at
    Pass values from parent lookups to child forms
    I ended up with setting up field mappings grabbing the values from the parent entity and copy that to the child entity, business rules cannot be used to solve this.
  • Suggested answer
    SpongYe Profile Picture
    5,559 Super User 2025 Season 1 on at
    Pass values from parent lookups to child forms
    Hi @Arjan,
     
    You can achieve this by using Business Rules.
     
    You can create a business rule to set the country field based on the state field.
    Set the condition to check if the state field contains data, and then set the country field using the related state record.
    Otherwise you can achieve this by using JavaScript Approach.
     
    Hope this helps.

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,447 Most Valuable Professional

Leaderboard