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.

πŸš€ Scriptcase 9.12 is now available! Check out the new features here πŸ‘‰πŸš€ Next Monday (02/24), Scriptcase 9.12 will be released! Check out the new features before anyone else πŸ‘‰