Error in Text File Output

Unable to get fields from previous steps because of an error
Index: -1, Size: 4 can anyone help me out of this

Hi Namrata.
The data of the fields shown in the debug section, is the data that is released from the step that did pass. With that, you know what data got to be processed by the next step.
The step with error can not retrieve information regarding field values. You have to fix the error in question to the check outgoing values of the step in now in error.
A tip: if you right click on the step and select “input fields”, you can check which step was the latest that created/modified each incoming field.
Hope this helps.