Initial search?

Hi,

I want to load my grid with initial search request : WHERE client = (user id connected from sec_users table).

  1. How to get user ID from sec_users for the current user connected ?
  2. How Initialize the request ?

During the other searches I no longer want any filter on the field CLIENT.

Idea ?

Thanks

  1. In your Form Login, save the user ID in a global variable like “[glo_usr_id]”
  2. in your grid, in the “OnScript” event, play around with the “sc_select_where” macro.
1 Like

Hello Jefch,

Thank You very much !

This is my solution :

  1. Save user ID from App login

  1. Apply where query

Now, how aplly this query only on load page and not during search request ? Because during search request, this is my error message :

where

Have a nice day !

1 Like

My solution :

1 Like

Great. Happy to know you have figured it out.