Susan
|
| Posted: 12/01/2004, 2:42 PM |
|
I want to hide duplicate values on a Grid form. In my case, the Grid has a column for unit which I am sorting by, I don't want same unit number to appear in consecutive rows.The example in the help shows how to suppress the department name if it already appeared in a higher row as I put below, but I can not seem to get this to work in my grid.I don't get errors and get no changes to the grid. I have tried changing PrevDepartment to PrevUnit_id, Employees to tasks, department to unit_id but no results.
My grid (tasks) is setup with:
{unit_id} {task_name} {tenant_id} {phone_id} {task_start_date} {task_finish_date}
What am I doing wrong?
I would really like to do suppressing on unit_id, tenant_id, and phone_id.
function Employees_BeforeShowRow() {
global $Employees;
global $PrevDepartment;
if ($PrevDepartment == $Employees->department->GetValue()) {
$Employees->department->SetValue("");
} else {
$PrevDepartment = $Employees->department->GetValue();
}
}
|
|
|
 |
Susan
|
| Posted: 12/02/2004, 9:36 AM |
|
Should this be right?
function tasks_BeforeShowRow() {
global $tasks;
global $Prevunit_id;
if ($Prevunit_id == $tasks->unit_id->GetValue()) {
$tasks->unit_id->SetValue("");
} else {
$Prevunit_id = $tasks->unit_id->GetValue();
}
}
|
|
|
 |
Susan
|
| Posted: 12/07/2004, 6:43 PM |
|
Am I so out to lunch here that I am left asking myself questions?
|
|
|
 |
ajmartin
Posts: 11
|
| Posted: 12/07/2004, 6:53 PM |
|
Hi Susan,
without going in depth at this stage... the simple solution would be too set the SQL to use the UNIQUE option.
Adam
|
 |
 |
|