code: def assignCurrentRecord(self, text):
          
          if self.showTreePopup():
              item = self._treePopupWidget.currentItem()
              if item:
                  self._currentRecord = item.record()
              else:
                  self._currentRecord = None
              return
          
          # look up the record for the given text
          if text:
              index = self.findText(text)
          elif self.isRequired():
              index = 0
          else:
              index = -1
          
          # determine new record to look for
          record = self.recordAt(index)
          if record == self._currentRecord:
              return
          
          # set the current index and record for any changes
          self._currentRecord = record
          self.setCurrentIndex(index)
docs: Assigns the current record from the inputed text.
          
          :param      text | <str>