Because of the current inability to change a field based on another fields drop-down selection in a grid component (see previous thread "Filtering drop-down from prior selection"), I resorted to using a dialog component that now allows this feature. However, I'm having a problem linking the selected record from the grid to the dialog.
I followed the help file instruction ("Passing a Record From a Grid to a Dialog") and everytime I select the record from the grid, it stops at the transition.a5w page and I get the following error:
"...500 Internal Server Error
Script Error
Error:line:9 Missing or invalid keyword
----------------------------------------------------------------------
Alpha Five/7.0 Build/4076-3031 at ..."
The grid page is "user_accounts.a5w"
The grid component is grid component is "user_list"
The "key" field is "Logon_Id" which is also in the "results" a5w page (user_update.a5w).
The "link properties" in the "Logon_Id" field in the grid has "Computed from fields in the Grid" selected in the "Link address type" and the "Link Address" is as follows: "transition.a5w?logon_id={Logon_Id}" (without the quotes).
The transition page is "transition.a5w" that contains the following code (right from the help file with appropriate variable changes):
<%a5w
if (eval_valid("Logon_Id") = .F.) then
response.redirect("user_update.a5w")
end
end if
dim t as P
dim url as C
t = table.open("login")
t.order("logon_id")
t.fetch_find(logon_id)
url = "user_update.a5w?logon_id="+alltrim(t.Logon_id)+"&name="+alltrim(t.Name)+"&fname="+alltrim(t.Fname)+"&lname="+alltrim(t.Lname)
t.close()
response.redirect(url)
%>
Not being familiar with XBasic (long time Delphi programmer), I'm not sure if the error is pointing to the line: t.fetch_find(logon_id) or the line prior or after. I tried using quotes (t.fetch_find("logon_id")) but it made no difference.
I might mention, at this point, that I also tried using the help file "Displaying a Selected Record in a Dialog" instruction but the result page would always return the first field even though the URL showed the correct "key" variable. If anyone wants more detail on THAT issue, just ask =)
I've tried to explain the problem as best I could but probably missed something somewhere. Any help in this issue would be GREATLY appreciated!
Thanks, Edward, for the info on version 8 release and thanks to everyone for reading this long post!
I followed the help file instruction ("Passing a Record From a Grid to a Dialog") and everytime I select the record from the grid, it stops at the transition.a5w page and I get the following error:
"...500 Internal Server Error
Script Error
Error:line:9 Missing or invalid keyword
----------------------------------------------------------------------
Alpha Five/7.0 Build/4076-3031 at ..."
The grid page is "user_accounts.a5w"
The grid component is grid component is "user_list"
The "key" field is "Logon_Id" which is also in the "results" a5w page (user_update.a5w).
The "link properties" in the "Logon_Id" field in the grid has "Computed from fields in the Grid" selected in the "Link address type" and the "Link Address" is as follows: "transition.a5w?logon_id={Logon_Id}" (without the quotes).
The transition page is "transition.a5w" that contains the following code (right from the help file with appropriate variable changes):
<%a5w
if (eval_valid("Logon_Id") = .F.) then
response.redirect("user_update.a5w")
end
end if
dim t as P
dim url as C
t = table.open("login")
t.order("logon_id")
t.fetch_find(logon_id)
url = "user_update.a5w?logon_id="+alltrim(t.Logon_id)+"&name="+alltrim(t.Name)+"&fname="+alltrim(t.Fname)+"&lname="+alltrim(t.Lname)
t.close()
response.redirect(url)
%>
Not being familiar with XBasic (long time Delphi programmer), I'm not sure if the error is pointing to the line: t.fetch_find(logon_id) or the line prior or after. I tried using quotes (t.fetch_find("logon_id")) but it made no difference.
I might mention, at this point, that I also tried using the help file "Displaying a Selected Record in a Dialog" instruction but the result page would always return the first field even though the URL showed the correct "key" variable. If anyone wants more detail on THAT issue, just ask =)
I've tried to explain the problem as best I could but probably missed something somewhere. Any help in this issue would be GREATLY appreciated!
Thanks, Edward, for the info on version 8 release and thanks to everyone for reading this long post!
Comment