void DoGetCsvFields() { CsvData _data = CsvData.GetReference(reference.Value); if (_data == null) { Fsm.Event(errorEvent); fields.Resize(0); return; } int _record = zeroBasedIndexing?record.Value:record.Value - 1; if (_data.RecordCount <= _record) { LogError("Csv Data '" + reference.Value + "' doesn't have " + (_record + 1) + " records, only " + _data.RecordCount); Fsm.Event(errorEvent); fields.Resize(0); return; } fields.stringValues = _data.GetRecordAt(_record); fields.SaveChanges(); }