Okay this is my problem
I build a list using keylist_build from a table that I search in a ui_dialog_box that as over 100k records. I search that list by last name then first name by typing in the last name from the keyboard and the list is index by last name so it goes to the combination of keys I type. Once I find the name in the list ( the name is highlighted) I push the add button and add it to an array that I also display in the ui_dialog_box. Here is the problem when I go back to search for a second name and so forth to add to my array list the keylist_build will not search using the keyboard anymore like it did with the first search I did. I can move the scroll bar on the keylist_build list and scroll through a 100k names but that takes to long. I want to be able to start typing the last name and it goes to that last name. it works on the first choice but after that I can't search anymore. here is my code
thanks for any help
Willie
DIM SHARED shuttle as C
DIM SHARED varC_result as C
dim s_array[250] as p
dim cnt as n
dim cnt2 as n
dim global cnt_riders as c
dim global print_flag as c
print_flag="F"
cnt=1
cnt_riders="0"
heading_string = "Select Tour Rider"
footer_string = ""HIGHLIGHT Name then press the ADD button to add to Tour Bus""
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
DIM shuttle_rl_def as C
shuttle_rl_def = "kl=play,{keylist_build("H=.025,1:25[Name],2:25[Address],3:25[City]",''+Player_id,left(''+Name,25),left(''+Addr,25),left(''+City,25))}{Name<>''}"
varC_result = ui_dlg_box("BUS",<<%dlg%
{region}
{text=80,1:heading_string};
{endregion}|{sp}|;
{frame=1,1:Players Club Name}
{region}
:[%@shuttle_rl_def%.70,20shuttle];
{endregion}|{sp}|
{region}
{lf};
{lf};
{lf};
{lf};
{lf};
<Add>;
{lf};
<Remove>
{lf};
{lf};
{lf};
{lf};
<Print Coupons>
{endregion}
{frame=1,1:Tour Bus Riders}
{region}
:[.45,20array_no^#s_array[\].name];
{lf};
Tour Bus Riders:{text=6,cnt_riders}
{endregion};
{region}
{text=80,1:footer_string};
{endregion};
%dlg%,<<%code%
if a_dlg_button = "Add" then
A_dlg_button=""
tbl_play=table.open("play")
tbl_play.index_primary_put("id")
rec=tbl_play.fetch_find(shuttle)
s_array[cnt].name=tbl_play.Player_id+" "+tbl_play.Name
s_array[cnt].player_id=tbl_play.Player_id
s_array[cnt].NameSort=tbl_play.name
tbl_play.close()
cnt=cnt+1
cnt_riders=str(cnt-1,3,0)
shuttle=""
end if
if a_dlg_button = "Remove" then
a_dlg_button=""
if cnt=1 .OR. array_no="" then
else
cnt2=1
while left(array_no,10)<>s_array[cnt2].player_id
cnt2=cnt2+1
end while
s_array.delete(cnt2,1)
cnt=cnt-1
cnt_riders=str(cnt-1,3,0)
array_no=""
end if
end if
if a_dlg_button = "Print Coupons" then
print_flag="T"
end if
%code%)
I build a list using keylist_build from a table that I search in a ui_dialog_box that as over 100k records. I search that list by last name then first name by typing in the last name from the keyboard and the list is index by last name so it goes to the combination of keys I type. Once I find the name in the list ( the name is highlighted) I push the add button and add it to an array that I also display in the ui_dialog_box. Here is the problem when I go back to search for a second name and so forth to add to my array list the keylist_build will not search using the keyboard anymore like it did with the first search I did. I can move the scroll bar on the keylist_build list and scroll through a 100k names but that takes to long. I want to be able to start typing the last name and it goes to that last name. it works on the first choice but after that I can't search anymore. here is my code
thanks for any help
Willie
DIM SHARED shuttle as C
DIM SHARED varC_result as C
dim s_array[250] as p
dim cnt as n
dim cnt2 as n
dim global cnt_riders as c
dim global print_flag as c
print_flag="F"
cnt=1
cnt_riders="0"
heading_string = "Select Tour Rider"
footer_string = ""HIGHLIGHT Name then press the ADD button to add to Tour Bus""
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
DIM shuttle_rl_def as C
shuttle_rl_def = "kl=play,{keylist_build("H=.025,1:25[Name],2:25[Address],3:25[City]",''+Player_id,left(''+Name,25),left(''+Addr,25),left(''+City,25))}{Name<>''}"
varC_result = ui_dlg_box("BUS",<<%dlg%
{region}
{text=80,1:heading_string};
{endregion}|{sp}|;
{frame=1,1:Players Club Name}
{region}
:[%@shuttle_rl_def%.70,20shuttle];
{endregion}|{sp}|
{region}
{lf};
{lf};
{lf};
{lf};
{lf};
<Add>;
{lf};
<Remove>
{lf};
{lf};
{lf};
{lf};
<Print Coupons>
{endregion}
{frame=1,1:Tour Bus Riders}
{region}
:[.45,20array_no^#s_array[\].name];
{lf};
Tour Bus Riders:{text=6,cnt_riders}
{endregion};
{region}
{text=80,1:footer_string};
{endregion};
%dlg%,<<%code%
if a_dlg_button = "Add" then
A_dlg_button=""
tbl_play=table.open("play")
tbl_play.index_primary_put("id")
rec=tbl_play.fetch_find(shuttle)
s_array[cnt].name=tbl_play.Player_id+" "+tbl_play.Name
s_array[cnt].player_id=tbl_play.Player_id
s_array[cnt].NameSort=tbl_play.name
tbl_play.close()
cnt=cnt+1
cnt_riders=str(cnt-1,3,0)
shuttle=""
end if
if a_dlg_button = "Remove" then
a_dlg_button=""
if cnt=1 .OR. array_no="" then
else
cnt2=1
while left(array_no,10)<>s_array[cnt2].player_id
cnt2=cnt2+1
end while
s_array.delete(cnt2,1)
cnt=cnt-1
cnt_riders=str(cnt-1,3,0)
array_no=""
end if
end if
if a_dlg_button = "Print Coupons" then
print_flag="T"
end if
%code%)
Comment