Hi everybody,
I have index on bintoc(DsID)+ExtrYear+ExtrWeek in my table.
If I pass DsID, I want to scan for bintoc(DsID)+ExrtrYear+ExtrWeek = bintoc(tnDsID)+lcIssue, otherwise I want to scan for another condition.
So I'm trying to construct my lcFor as a variable, then do
scan &lcFor
I can not make it to work correctly. Can you please advise?
I has written this piece of code, but every time I tried to send a message, I got page not found error, so this is my last attempt:
lcIssue = .ThisIssue
select BatchCntrl
lcOldOrder = order()
set order to DsIDWeek
lcFor = iif(vartype(m.tnDsID)="N",;
[for bintoc(DsID)+extryear+extrweek=bintoc(tnDsID)+lcIssue], ;
[for State+ExtrYear+ExtrWeek=']+ m.lcStateWeek+['])
scan &lcFor
If it's not broken, fix it until it is.
My Blog