Pass a user into "Select User Script"
Posted:
Fri Dec 11, 2009 9:17 pm
by typeleven
I want to have a startup script that filters by a username without the select user dialog popping up. as I read the comments in the following script...
Select User ( Operation , Action ) { User , Multiple Selection }
It looks to me that I would just have to pass the following parameter
"User = EM"
But that doesn't work. Can you give me an example of the right way?
Posted:
Sat Dec 12, 2009 7:57 am
by John Sindelar
Good thinking, but the script should probably be named "Present Users Selection Screen" as the Select User script presents a user selection dialog: and the User parameter in it allow you to have one user pre-selected. So, for example, if you tagged each customer with a sales person (user) you could use this selection routine to present a list of users to select from. And, if you were doing this from a customer that already had EM associated with them, EM would appear as the currently selected choice when the dialog was presented.
(And remember that script parameters in parentheses are required, so you'd normally call this as "Operation = Begin ; Action = Filter ; User = EM" )
So instead of running that script, simply set the field Filters::FilterUser_kf_Glob to "EM" and commit records. If you're on something other than the About screen when you do this you may want to call the script "Filter - Pass Filters" to set the filter down to the hours table used by the week and schedule views.
Hope that helps,
John