Master/Detail autoselect master id

Hi!

I have a master called Site, each site has various children like the pic below.

It is possible that when adding a new child to automatically select the master id? I tried to follow a thread example here Add Detail record in Master Detail form but I'm battling to get the correct values to match. I have Site (with rID) then SiteContact would have its SiteID set to the Site rID. how would I formulate the expression to select the master (Site with rID)

Thanks :slight_smile:
Xarion

  1. In RowSelect Event of sites grid set a new variable SiteID to selected Site.RID
  2. Now On the Click event of the [Add] button you can set above value to the required rID column
1 Like

Hello Vinod thanks for some direction, I've managed the first part however the Click even doesnt seem to give me any Row to select. Here is the Click dialog I get for the Add button.

Essentially I'd like to set the drop list in the add screen to my Site rID.

Hi Xarion,
For dropdown list you need to first get the data on page load event


2. After that set the data obtained above to the dropdown control