‎2010-05-19 05:06 PM
‎2010-09-10 04:25 PM
‎2010-09-11 12:10 AM
!-- four string type parameters needed;
!-- "valuelist_a", "valuelist_b", "valuelist_c", "search"
!-- the code can be a master or value script
dim value_a[], value_b[], value_c[]
filename= "Table.txt"
ch1=OPEN("TEXT",filename,"SEPARATOR='\t',MODE=RO,LIBRARY")
!--counting the total number of rows
do
row= row+1
n=INPUT(ch1,row,1,string1)
while n>-1
!--reading the first column for valuelist_a
for k= 1 to row-1
n=INPUT(ch1,k,1,string1)
value_a= string1
next k
!--reading the first column for valuelist_b if starts with the search string (valuelist_a)
len= strlen(valuelist_a)
for k= 1 to row-1
n=INPUT(ch1,k,1,string1)
if strsub(string1, 1, len)= valuelist_a then
r= r+1
value_b= string1
endif
next k
!--reading both columns for valuelist_c if contains the search string
for k= 1 to row-1
n=INPUT(ch1,k,1,string1,string2)
if strstr(string1+string2, search) then
s= s+1
value_c= string1+ " - "+ string2
endif
next k
CLOSE (ch1)
values "valuelist_a" value_a, custom
values "valuelist_b" value_b
values "valuelist_c" value_c
Regards, Juha
‎2010-09-11 12:14 AM
‎2010-09-13 06:30 PM
‎2010-09-13 08:25 PM
‎2010-09-13 09:32 PM
‎2010-09-13 11:45 PM