I have a project that I am trying to create that will allow the user to request a song from a dialog box that will allow the user to select the artist in one dropdown then select all the songs by that artist from a second dropdown. The song list is retrieved from a text file with the formatting as Artist(TAB)SOng Title(TAB)Filename) I have the following code to get the artist name, song title, and filename as follows:
Code:
 readRequestsIntoArray {
    set %request.loop 1
    set %request.info $read(requestlist.txt,%request.loop)
    while ( %request.info != $null ) {
      set %request.artist [ $+ [ %request.loop ] ] $gettok(%request.info,1,9)
      set %request.song [ $+ [ %request.loop ] ] $gettok(%request.info,2,9)
      set %request.file [ $+ [ %request.loop ] ] $gettok(%request.info,3,9)
      inc %request.loop 
      set %request.info $read(requestlists.txt,%request.loop)
    }
    dec %request.loop
    set %request.total %request.loop
    unset %request.loop
    unset %request.info


I am just not sure how to retrieve a list of artists so that they are not repeated. and how to create the second dropdown that lists all the song titles from the selected artist in the first dropdown. Any help would be appreciated.