Norman Berger
|
| Posted: 07/01/2005, 11:32 AM |
|
Have a master - detail set up and if select link from master successfully opening detail grid with selected information.
I am able to successfully use CCGetFromGet("proj_name", "") to retrive passed parameter and display it at top of screen.
Now what I would like to do is populate the data entry test box associated with this field.
Seems like before show for the field detl_name is the place to put the code just not sure what this code should be?
Any help appreciated. Thanks/norm
|
|
|
 |
datadoit.com
|
| Posted: 07/01/2005, 12:01 PM |
|
$form->detl_name->SetValue(CCGetFromGet("proj_name",""));
|
|
|
 |
norman Berger
|
| Posted: 07/02/2005, 4:36 AM |
|
Thx reply.
What you suggest makes sense but not doing the job.
Even if I add a default value to the text control it does not populate it.
Any more ideas? Thx/norm
|
|
|
 |
wkempees
|
| Posted: 07/02/2005, 12:29 PM |
|
Did you replace datadit.com's $form with the name of your form?
The rest looks allright as he actually used the field name you supplied
in your question. And you state that you can display the value.
Good luck
|
|
|
 |
Norman Berger
|
| Posted: 07/03/2005, 4:25 AM |
|
Yes replaced $form with my program's form name.
I think problem has something to do with the fact that this is parameter field that I am linking the master and detail form on vs. just an ordinary field.
Symptom is without any extra programming when I have situation where you link from master and there is no detail I am trying to fill the detl_name field with the value of the proj_name parameter.
If there are no existing detail the grid says 'No records' and the detail field is EMPTY even if i default or use this expression in show before.
If there are existing details then the detl_name field IS filled with the proper value (I did nothing special to achieve this) and thisi s the desired result.
So my problem is really when there are no existing matching details and what I want is to automatically fill the detl_name based upon the proj_name value passed as parameter.
I do use an echo command I inserted in the code and I definately can display the project name before the form.
Again, thanks for any hint./ndb
|
|
|
 |
Norman Berger
|
| Posted: 07/04/2005, 3:30 AM |
|
Problem solved!
By experimenting added line of code at end of intialize
$this->detl_name->SetValue(CCGetFromGet("proj_name","");
Works under all conditions as needed.
Thanks/
|
|
|
 |