I have 2 Tabes, Sites and Surveys
In the Sites table i have 5 columns, SiteID, SiteName, PostCode, EmailAddress, PhoneNumber
On the Surveys table i want to be able to get the Site Name from the siteID based on what is in the Sites table
I have created a 1 to many relationship from the sites but do not know what to do next in order for the Site Name to auto populate
Can you help me with this
Hi @Lynch66 ,
If SiteName is primary name column in your sites table then when you create 1 to many relationship in Survey, it will show the sitename in your survey lookup field for Site. However if it is not your primary name column and SiteId or any other is primary name column then there are two options.
1. Create a new column in your Survey table for SiteName and make it calculated column, get the SiteName in your calculation and place that field into your form
2. Create a quick view in Site table and use only SiteName in the Quickview, Goto Survey form and add a component from top menu ribbon then select the quick view under Related Data from left Navigation menu. Select the Lookup and Category (quick view) and it will be added to the form.
Please Thumbs up and accept as solution if my post helped you solve your issue.
Hi @Lynch66 ,
You might not be happy with a Power Automate approach here since it would be asynchronous so when you click to add a new table for the child entity the information will not be populated until after the record is saved and then might take some time from there. The user would need to refresh their screen to see the information populated...
If you are utilizing a model-driven application the column mappings is the best way to default from a related entity when you create the child table from the parent. It will populate the data on the form as you go into create a new record. The 2nd approach @ChrisPiasecki mentioned I use a lot as well to default other fields / information based on what I entered on the form and it is real time.
If you still want to go down the Power Automate approach you would do the following:
Hope this helps. Please accept if this answers your question or Like if helps in any way.
Thanks,
Drew
Hi @Lynch66,
If you're using a model driven app, you can define Column Mappings in your 1:N Relationship configuration. This will auto populate fields from a parent Lookup field when creating a new record. Note that you must use the +Add from a sub grid or associated view for the auto populating to work.
You can also use a real time Dataverse workflow to populate the information from the parent record when saving the record.
Finally, you could use a Power Automate Cloud flow to do the same as a Dataverse workflow but asynchronously (near real-time).
---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.