Announcement

Collapse
No announcement yet.

filter with user global variable?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • filter with user global variable?

    Hello,

    I have a grid application and i want to make that when the users open a grid the only can see the records with his name on it.
    So i tried to change the SQL statment of the grid and use the global variable saved in Login application in the clause WHERE, like this

    Code:
    SELECT
       mejora.id_project,
       mejora.date,
       mejora.status,
       mejora.validator,
       users.name,
       users.login,
       validation.date_approved ,
       validation.approved_name,
       validation.approved
    FROM
       mejora INNER JOIN validacion ON mejora.id_project = validacion.id_ptoject
       INNER JOIN sec_users users ON mejora.validator = users.name
    WHERE 
       (validacion.approved = '') AND
       (mejora.validator = '[usr_name]')
    but this is not working!! can anyone tell me what im doing wrong? or if there is another way to do this?

    thank you

  • #2
    Originally posted by steph07 View Post
    Hello,

    I have a grid application and i want to make that when the users open a grid the only can see the records with his name on it.
    So i tried to change the SQL statment of the grid and use the global variable saved in Login application in the clause WHERE, like this

    Code:
    SELECT
       mejora.id_project,
       mejora.date,
       mejora.status,
       mejora.validator,
       users.name,
       users.login,
       validation.date_approved ,
       validation.approved_name,
       validation.approved
    FROM
       mejora INNER JOIN validacion ON mejora.id_project = validacion.id_ptoject
       INNER JOIN sec_users users ON mejora.validator = users.name
    WHERE 
       (validacion.approved = '') AND
       (mejora.validator = '[usr_name]')
    but this is not working!! can anyone tell me what im doing wrong? or if there is another way to do this?

    thank you
    Did you enabled debug mode and see if your 'where' it's ok?
    Did you tried with [urs_login]?
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment

    Working...
    X