NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: rjolda on March 27, 2009, 04:13:13 PM
-
Hi,
I want to have the user give a numeric value when they log in. This will be the Site_id.
When they browse the records, I want to have them filtered by "site_id" so that they see only the records for their site.
Question:
When they enter their Site_Id at login, do I set it as a value in the session Queue?
Where do I set the embed to do that?
If I do, then how do I use that in the filter expression in the browse???
TIA,
R Jolda
-
Hi,
On the login form, inside the "ValidateUpdate 2.End" embed point. Verify they have logged in correctly then save SiteID in session queue.
p_web.SetSessionValue('_siteID',SiteID)
I use a leading _ to help me know my session values that are special, you don't want to accidently use the field name again somewhere.
In a browse use a filter like this:
'XYZ:SiteID = '&p_web.GSV('_siteID')
Thats it!
Regards
Bill Shields
-
Filters can be sometimes be tricky. If SiteID is a string you may need to wrap it in <39>
'XYZ:SiteID = <39>'&p_web.GSV('_siteID') & '<39>'
If you have complex filters I find it easier to set them in an embed point where I can debug.
Kev