Setting up options from the database

I looked over all the dynamic options documentation, but can’t quite put it together.

First in the connector, I fetch the options from the database and associate them with the main scheduler data:

        $options->render_table('track', 'track_id', 'track_id(value),name(name)');
        $scheduler->set_options("track", $options);

The field that $scheduler is going to pull up is called track_id and maps to track_id within the options.

 $scheduler->render_sql($sql, "appt_id",    
            "start,end,name,location,details,organization_id,type,track_id");

This correctly returns the list, which includes event data, track_id (number) and the options:

   <data>...
      <event id="113">
           ....
           <track_id>
                <![CDATA[ 1 ]]>
           </track_id>
     </event>
   <coll_options for="track_id">
       <item value="1" name="a"/>
       <item value="2" name="b"/>
       <item value="3" name="c"/>
  </coll_options>
 </data>

I define within the lightbox:

 {name:"track", type:"textarea", map_to:"track", options:scheduler.serverList("track")}

I come up with blank data. If I change map_to:“track_id” - I do get the id correctly, but of course, no label.

What am I doing wrong? Also, what is the best way to get at that data within javascript:

event.track_id    =>   event.track

Thanks as always!
Kate

Ugh… I figured it out… I was using textarea instead of select. Everything is pretty clear now. So sorry!