Master Detail Creating a new detail record

Talk about programming tricks and examples

Moderator: alexandrleonenko

pbkclements
Newbie
Newbie
Posts: 4
Joined: Sep 23rd, '10, 11:21

Master Detail Creating a new detail record

Postby pbkclements » Sep 23rd, '10, 11:28

Hi,

I have a master detail form with organisations, and electricity meters belonging to thios organisations. When I try to add a new detail record, the dropdown showing organisations is blank but it should contain that for the selected company.

Can anyone please advise what I am doing wriong/need to do.

Thanks

Peter Clements

administrator
Site Admin
Site Admin
Posts: 6010
Joined: Jan 7th, '09, 23:18
Contact:

Re: Master Detail Creating a new detail record

Postby administrator » Sep 26th, '10, 11:13

First step: debug=true;
Second step: try to analyze what you see on the screen and then please post your question with more detail.

pbkclements
Newbie
Newbie
Posts: 4
Joined: Sep 23rd, '10, 11:21

Re: Master Detail Creating a new detail record

Postby pbkclements » Sep 26th, '10, 12:05

Thanks, I have put debug mode on & had a think about what is going on. Not solved yet, so here is a more detailed description. The master detail example functions in the same way.

1. Select master record, select view
2. In the child record grid, select add new
3. The add grid for the child is displayed, but the parent (organisationname dropdown ) is blank, I need it to be the parent selected.

Debug provides no useful information, what I think is a means of passing the organisation name to the chld grid view, and setting the dropdown to this value.

Hope that's enough info to understand my problem. Thanks

Pete Clements

administrator
Site Admin
Site Admin
Posts: 6010
Joined: Jan 7th, '09, 23:18
Contact:

Re: Master Detail Creating a new detail record

Postby administrator » Sep 27th, '10, 08:12

Ok, how did you fill organisationname dropdown? How did you define this field, as foreign key as enum?
You're right, you have to pass or catch organisation name to select it in dropdown.
There 2 ways: or you pass it or you catch it from "rid" (record id of the clicked record from the first datagdrid) and the use it for your proposes


Return to “Programming Tricks”