Hello,
I�m trying to set two session variables from a dialog component thats� dropdown lists Clients by first and last name and stores the ID value. So far, so good. With the Id value, I have successfully created a protected session variable. I�d like to create session variables vclntFname & vclntLname to display the Client names on other pages. The Users table has the fields ID, Fname, and Lname.
After Validate code:
dim session.__protected__vuserref as C
dim session.vclntFname as C
dim session.vclntLname as C
dim tbl as P
dim qry as P
session.__protected__vuserref = CurrentForm.Controls.Clients.value
tbl = table.open("[pathalias.adb_path]\users")
query.order = ""
query.filter = "Id =" + quote(session.__protected__vuserref)
qry = tbl.query_create()
tbl.fetch_find()
session.vclntLname = alltrim(tbl.lname)
session.vclntFname = alltrim(tbl.fname)
tbl.close()
Response.Redirect("Client.a5w")
On the Client List page, after choosing a client and submitting, the protected session variable will display, but I get the following warning:
�The number of arguments or the type of one or more arguments do not match any existing function.�
While testing in the code editor I substituted the actual Id value �00000000� for the (session__protected__vuserref) a client named User One.
When trying:
? alltrim(tbl.fname)
= �User�
? alltrim(tbl.lname)
= �One�
? session.vclntfname
= ��
? session.vclntLname
= ��
Can anyone see what I�m doing wrong? Or is there an easier way to pull the fname and lname from the dialog dropdown list based on the selected client?
Thanks,
Bob
I�m trying to set two session variables from a dialog component thats� dropdown lists Clients by first and last name and stores the ID value. So far, so good. With the Id value, I have successfully created a protected session variable. I�d like to create session variables vclntFname & vclntLname to display the Client names on other pages. The Users table has the fields ID, Fname, and Lname.
After Validate code:
dim session.__protected__vuserref as C
dim session.vclntFname as C
dim session.vclntLname as C
dim tbl as P
dim qry as P
session.__protected__vuserref = CurrentForm.Controls.Clients.value
tbl = table.open("[pathalias.adb_path]\users")
query.order = ""
query.filter = "Id =" + quote(session.__protected__vuserref)
qry = tbl.query_create()
tbl.fetch_find()
session.vclntLname = alltrim(tbl.lname)
session.vclntFname = alltrim(tbl.fname)
tbl.close()
Response.Redirect("Client.a5w")
On the Client List page, after choosing a client and submitting, the protected session variable will display, but I get the following warning:
�The number of arguments or the type of one or more arguments do not match any existing function.�
While testing in the code editor I substituted the actual Id value �00000000� for the (session__protected__vuserref) a client named User One.
When trying:
? alltrim(tbl.fname)
= �User�
? alltrim(tbl.lname)
= �One�
? session.vclntfname
= ��
? session.vclntLname
= ��
Can anyone see what I�m doing wrong? Or is there an easier way to pull the fname and lname from the dialog dropdown list based on the selected client?
Thanks,
Bob
Comment