   appendData: ($element, data) ->
     do(appendString = '') =>
       _.each data, (obj_hash) ->
-        appendString = "<option value='" + obj_hash.id + "'>"
-        appendString += obj_hash.name + "</option>"
-        $element.append appendString
+        @appendString = "<option value='" + obj_hash.id + "'>"
+        @appendString += obj_hash.name + "</option>"
+        $element.append @appendString
 
   addPlaceHolder: ($element, name) ->
     $element.html("<option value=''>"+ name + "</option>")

        fd_view.field.appendData($company_id, companies)
        if selected_compId && selected_compId != ''
          $company_id.val selected_compId
          this.setSelectedCompAndPopulateLocs(fd_view, selected_compId,
                                              selected_locId, selected_divId)

  populateLocationsByCompanyId: (e) ->
    do(selected_company_id = $(e.currentTarget).val(),

        locations = selected_comp.locations

      if($location_id && locations.length > 0)
        @addPlaceHolder($location_id, '--- Select ---')
        @appendData($location_id, locations)
        if selected_locId && selected_locId != ''
          $location_id.val selected_locId
          @setSelectedLocAndPopulateDivs(fd_view, selected_locId,
                                             selected_divId)

  populateDivisionsByLocId: (e) ->
    do(selected_location_id = $(e.currentTarget).val(),
      that = e.data.that,
      fd_view = e.data.fd_view
    ) =>
      that.setSelectedLocAndPopulateDivs(fd_view, selected_location_id)

  setSelectedLocAndPopulateDivs: (fd_view, selected_locId,
                                  selected_divId = '') ->
    do(selected_loc = null)=>
      selected_loc = @selected_comp.locations.getHashObject(selected_locId)
      @populateDivisions(fd_view, selected_loc, selected_divId)

  populateDivisions: (fd_view, selected_loc, selected_divId = '') ->
    do( divisions = [],
