DeSaedeleer
Posts: 8
|
| Posted: 11/20/2006, 7:03 AM |
|
I have a form, showing some information about an employee (Id_employee, name, address ...). On the same page I have an editable grid where several remarks about that employee can be entered. I enter the remarks and a custom code schould add the Id_employee to that record in the "BeforeBuildInsert" action.
What is the syntax for that? I tried
Gridname.id_employee.value = formname.Id_employee.value
but it doesn't work.
Kind regard from the newbe
|
 |
 |
peterr
Posts: 5971
|
| Posted: 11/20/2006, 10:41 AM |
|
You cannot refer to form values of another form. However, since the first firm displays data based on some parameter you can use the same parameter in the 2nd form. For example try the CCGetParam function.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Greg Martin
|
| Posted: 11/20/2006, 12:56 PM |
|
Given that Peter knows a lot more than me with CCS I'm going to be careful here 
But I think your indicating that the information is on the same form? If so then you need to make the employee_id a parameter of the page, so it's available to you after the form is posted back by the end user.
Hope this helps,
Greg
gmartin@microresource.co.uk
www.microresource.co.uk
|
|
|
 |
De Saedeleer
|
| Posted: 11/21/2006, 2:26 AM |
|
Thank you very much, I tried the ccGetparam function but without success. Here is a descrpton on my application:
First a search forms ask for a Department code and shows a grid with all the Sections of that Department. Clicking on a Section_Id passes the URL with te Section_Id parameter to a page with a form and an updateable Grid. The form shows some information about the section (Section_id, name, address ...). The updateable grid shows the employees affected to that section. Its datasource contains 2 fields: the section_Id and the employee_id. To add an employee, the employee_id is looked up in a listbox. Then the grid is submitted for adding a new record to the table. A "BeforeBuildInsert" function should fill in the Id_section. And here comes the problem:
This is my syntax:
GridName.Id_section.value = ccgetparam("id_section", empty)
What did I do wrong?
Kind regards
|
|
|
 |
Greg Martin
|
| Posted: 11/21/2006, 1:46 PM |
|
I'm gussing your looking for an employeeid with a dropdown combobox which will post back the form to fill in the employee details, so you will lose the Section_id parameter unless you specify it again as a parameter on the post-back of the form.
Is this close?
Thanks,
Greg
Quote De Saedeleer:
Thank you very much, I tried the ccGetparam function but without success. Here is a descrpton on my application:
First a search forms ask for a Department code and shows a grid with all the Sections of that Department. Clicking on a Section_Id passes the URL with te Section_Id parameter to a page with a form and an updateable Grid. The form shows some information about the section (Section_id, name, address ...). The updateable grid shows the employees affected to that section. Its datasource contains 2 fields: the section_Id and the employee_id. To add an employee, the employee_id is looked up in a listbox. Then the grid is submitted for adding a new record to the table. A "BeforeBuildInsert" function should fill in the Id_section. And here comes the problem:
This is my syntax:
GridName.Id_section.value = ccgetparam("id_section", empty)
What did I do wrong?
Kind regards
|
|
|
 |
wkempees
|
| Posted: 11/21/2006, 2:22 PM |
|
Quote :
> First a search forms ask for a Department code and shows a grid with all
> the
> Sections of that Department. Clicking on a Section_Id passes the URL with
> te
> Section_Id parameter to a page with a form and an updateable Grid. The
> form
> shows some information about the section (Section_id, name, address ...).
> The
> updateable grid shows the employees affected to that section. Its
> datasource
> contains 2 fields: the section_Id and the employee_id. To add an employee,
> the
> employee_id is looked up in a listbox. Then the grid is submitted for
> adding a
> new record to the table. A "BeforeBuildInsert" function should fill in the
> Id_section. And here comes the problem:
>
> This is my syntax:
> GridName.Id_section.value = ccgetparam("id_section", empty)
>
> What did I do wrong?
Just as a hint:
Are you mixing up Id_section and section_Id??
and how about mixed case ?
In PhP my Grid would filter on Section_Id type URL
(capitalized as per your quoted text)
Walter
( Camels are nice, but confusing one or two humps)
|
|
|
 |
|