Mickael
|
| Posted: 07/16/2002, 7:27 AM |
|
I want to add number after master/detail link for example for the link
dentists in master i want to put in brackets the number of events concerned
ex dentist(22).
please help
|
|
|
 |
Yast
|
| Posted: 07/16/2002, 2:03 PM |
|
To concat 2 fields i usually works with view in SQL Server
str(field1)+str(field2) but u can also use the build query function in the datasource property in design mode
|
|
|
 |
Nicole
|
| Posted: 07/17/2002, 6:13 AM |
|
Mickael,
I think you need some manual coding to solve it. Create Before Show Row event. There you should look up the number of records for each category, then concatenate it with field value. E.g.:
PHP
global $form_name;
global $DBconnection_name;
$number = CCDlookUp("count(*)", "table_name", "foreign_key_field=" . $form_name->promery_key_field->Value, $DBconnection_name);
$form_name->category_name->SetValue($form_name->category_name->Value. " (". $number. ")");
|
|
|
 |
Mickael
|
| Posted: 07/18/2002, 12:23 AM |
|
Nicole,
i think you're right your indications are more available but i can't find the appropriate place to custom cod, i did it on events before show and then error message, did i put it in master or detail events and where? please help
thanks Nicole.
|
|
|
 |
Nicole
|
| Posted: 07/18/2002, 7:01 AM |
|
Mickael,
place the code in Before Show Row event for master grid form. Do not forget to replace names with real ones.
What error have you got?
|
|
|
 |
Mickael
|
| Posted: 07/19/2002, 12:25 AM |
|
Nicole,
I did exactly as you explained but i had the following error message
Call to a member function on a non-object in common.php on line 336.
What I want is for example
for a table named eventype a have a field named eventype_us in master grid
linke to detail which table is events
Could you write me please the same code within variable.
the primary key in eventype is eventype_id
in events is eventype_id too :events.eventyps_id
the master grid is eventmaster
the detail grid is eventdetail
thanks Nicole for your strong Help
|
|
|
 |
Mickael
|
| Posted: 07/23/2002, 2:25 AM |
|
Nicole,
Hi i did exactly what you said but I always got parse error : Call to a memeber function on a non object
|
|
|
 |
Mickael
|
| Posted: 07/25/2002, 5:18 AM |
|
I did exactly as you're explained but I always got prse error
call to member function on a non object
why
thanks
|
|
|
 |