What error are you getting or what is the problem?
I would normally started my Statement like
IF ROWNO() =1,
But doesn't seem to be the problem. Does the field CurrentSchedule exist in the data?
Previous() works on load.
Peek() works after, so can reference a field you are creating.
So try the peek.
No, "Current Schedule" does not exist in the data. As I noted, the error message I get is "field CurrentSchedule not found". I am trying to create this field. The problem is getting an initial value! i.e. in RowNo()=0 - that's the first row read in, which MIGHT (or might not) contain the "Run Schedule" trigger, there's no value for CurrentSchedule. I tried to set it in my first IF (If RowNo()=0, if(SchedLIne = 0, 'dummy', ...) so that there would be a value for Previous(CurrentSchedule) when it read RowNo()=1, but that doesn't seem to work.