I am in over my head on this one and could sure use some guidance. I used the Action Scripting method to develop the code below, which works perfectly to display the 8 fields from a filtered table and display them in a list box allowing me to pick a table record from a row of displayed fields in that record. Once the choice is made, the List Box then stores the data from 1 of the tables fields (Type) in a variable (Dvc_type) for my later use.
My problem is, how do I modify this script to store every one of the displayed fields data from the line I have chosen, into their own separate variables. i.e. Make stored to dvc_make and size stored to dvc_size etc.
I hope I am making sense here and thanks for any help offered !!
Here is the code I have working for one field and one variable:
'Create an XDialog dialog box to prompt for parameters.
DIM SHARED dvc_type as C
DIM SHARED varC_result as C
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
DIM dvc_type_rl_def as C
dvc_type_rl_def = "kl=devices,{keylist_build(\"H=.05,1:15[Testable],2:15[Type],3:25[Make],4:9[Size],5:25[Model],6:25[Serial],7:25[Location],8:27[Cross_Con],9:15[Hazard]\",''+type,left(''+testable,15),left(''+type,15),left(''+make,25),left(''+size,9),left(''+model,25),left(''+serial,25),left(''+location,25),left(''+cross_con,27),left(''+hazard,15))}{Cust_Numb=Var->cust2}"
varC_result = ui_dlg_box("Previous Devices",<<%dlg%
{region}
Choose Device:| [%@dvc_type_rl_def%.140,5dvc_type];
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%)
My problem is, how do I modify this script to store every one of the displayed fields data from the line I have chosen, into their own separate variables. i.e. Make stored to dvc_make and size stored to dvc_size etc.
I hope I am making sense here and thanks for any help offered !!
Here is the code I have working for one field and one variable:
'Create an XDialog dialog box to prompt for parameters.
DIM SHARED dvc_type as C
DIM SHARED varC_result as C
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
DIM dvc_type_rl_def as C
dvc_type_rl_def = "kl=devices,{keylist_build(\"H=.05,1:15[Testable],2:15[Type],3:25[Make],4:9[Size],5:25[Model],6:25[Serial],7:25[Location],8:27[Cross_Con],9:15[Hazard]\",''+type,left(''+testable,15),left(''+type,15),left(''+make,25),left(''+size,9),left(''+model,25),left(''+serial,25),left(''+location,25),left(''+cross_con,27),left(''+hazard,15))}{Cust_Numb=Var->cust2}"
varC_result = ui_dlg_box("Previous Devices",<<%dlg%
{region}
Choose Device:| [%@dvc_type_rl_def%.140,5dvc_type];
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%)
Comment