'create index of FTR_LIST by stepping thro' text string and using ADDIDXRECS
  x=strcount($ftrs)                    'message "x is:"&str(x)
  #ftrs = ptval                        'message "#ftrs is:"&str(#ftrs)
  vloadif(dpath|"ftr_list.vws")
  order change key "[Fitter_Code]"
  remove("ftrlist.idx")
  x = makeidx("ftr_list","ftrlist","0",3)     'message "x is:"&str(x)
  for i = 1 to #ftrs
    ftrcode = group($ftrs,i)
    data find "[Fitter_Code]" equal ftrcode options ""
    x = addidxrec("ftrlist.idx",precord,7)    'message "x is:"&str(x)
    if x<>0
      messboxwait(" Fitters index not building correctly [L270] ",0,0,1)
      return (-1)
    end if
  end for
  order change index "ftrlist.idx"
  order sort now dictionary "fitters.idx" fields "[Nickname]" ascending
  sr = @if(records<18,11-int(records/2),3) 'message "sr is:"&str(sr)
  er = @if(records<18,sr+records+1,20)     'message "er is:"&str(er)
  while true
    x = bpopdb("ftr_list",8,"","[Nickname]","L8","[Fitter_Name]","L0","[Fitter_Code]",sr,35,er,45,"",0)
    if x = -1
      screen clear box 1 1 sch scw 0 0 no-border
      repaint off
      exit while
    else
      ftrcode = [Fitter_Code]          'message "ftrcode is:"&str(ftrcode)
      $nickname = [Nickname]
      PrepLists()
      vloadif(dpath|"ftr_list.vws")
    end if
  end while
