softmafia
Posts: 44
|
Posted: 08/16/2012, 10:37 PM |
|
Hello Guys its been a Long while
Please i need help
an working on application
i have two tables USER and JOBS
user_id
name
dept
username
passwrd
sec_lev
etc...
job_id
jobname
description
executed
date
dept
etc....
each user is a head of a particular department i want to achieve two things
i have a grid page caled myjobs what i want is when a user loggs in he can only see jobs assigned to his Dept Only and also Jobs whos executed field is showing NO an it wont show the ones showing YES (will filter the grid show with the value in the dept field and the Executed Field )
Any Help will greatly be appreciated
I am BAck
_________________
softmafia |
|
|
apexsciences
|
Posted: 08/19/2012, 10:03 AM |
|
Le 2012-08-17 01:37, softmafia a écrit :
> Hello Guys its been a Long while
>
> Please i need help
>
> an working on application
>
> i have two tables USER and JOBS
> user_id
> name
> dept
> username
> passwrd
> sec_lev
> etc...
>
>
> job_id
> jobname
> description
> executed
> date
> dept
> etc....
>
> each user is a head of a particular department i want to achieve two things
>
> i have a grid page caled myjobs what i want is when a user loggs in he can
> only see jobs assigned to his Dept Only and also Jobs whos executed field is
> showing NO an it wont show the ones showing YES (will filter the grid show
> with the value in the dept field and the Executed Field )
>
> Any Help will greatly be appreciated
> I am BAck
> _________________
> softmafia
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
I assume you have also a dept table with a FK to the head user
i.e. TABLE dept
dept_id, (primary key)
user_id, (foreign key)
....
You need to filter the grid based on executed = NO and
on dept.user_id={CCGetUserID()} i.e. the jobs that are related to the
dept that are head for right?
One way:
Create an SQL query linking jobs, user and dept, so you get a listing
having the dept.user_id from dept. Then use dept.user_id to filter the jobs
Regards LP
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 08/23/2012, 5:29 AM |
|
A very similar operation to this is shown in the Task Manager CCS Documentation.
_________________
Central Coast, NSW, Australia.
|
|
|
|