I need to filter a page based upon user login (user_name). have had some help from steve wood in this link
http://msgboard.alphasoftware.com/al...ht=filter+page
but i cant seem to get this to work.
i have a table = tmembership
in the table a field = user_name
security setup and imported from table = tmembership. mapped the fields;
userid (security) = user_name (tmembership)
password (security) = password (tmembership)
all i want to do is to restrict the record based upon the user logged in.
i have tried steves suggestions as per link above - but doesnt seem to work (i must be doing something wrong)
i tried the following
which i got from the help file.
i then tried adding these 3 lines form the help file (i think the help file should provide a breakdown of each part of the line of code (ie what each part pertains to). i changed the names i thought were applicable to my DB.
but i receive an error saying can not find variable 'user_name'
this doesnt make much sense to me.
i also tried another filter provided by the forum
this was missing a parenthesis so i added one before the word 'session' again no joy. this just gave me all records.
i need help!!!!!!!
richard
http://msgboard.alphasoftware.com/al...ht=filter+page
but i cant seem to get this to work.
i have a table = tmembership
in the table a field = user_name
security setup and imported from table = tmembership. mapped the fields;
userid (security) = user_name (tmembership)
password (security) = password (tmembership)
all i want to do is to restrict the record based upon the user logged in.
i have tried steves suggestions as per link above - but doesnt seem to work (i must be doing something wrong)
i tried the following
Code:
DBF.filter = "userID = " + quote(session.__protected__UserID)
i then tried adding these 3 lines form the help file (i think the help file should provide a breakdown of each part of the line of code (ie what each part pertains to). i changed the names i thought were applicable to my DB.
Code:
level = lookup("[PathAlias.ADB_Path]\tmembership", "user_name=" + quote(user_name), "level") session.__protected__SecurityLevel = level session.__protected__UserID = lookup("[PathAlias.ADB_Path]\tmembership", "user_name=" + quote(user_name), "UserID")
this doesnt make much sense to me.
i also tried another filter provided by the forum
Code:
DBF.filter = "user_name = '"+ session.userid + "'")
i need help!!!!!!!
richard
Comment