Page 1 of 1

Try Catch

Posted: June 13th, 2017, 11:18 am
by leulae
I am developing an entry application, there are buttons to skip, I use below function to skip works fine.

function skipOP(alpha varToSKP)
skip to varToSKP;
end;

My proble: when I am in same variable and try to skip It gives the warning / Error, I know it is reasonable

Unable to ‘skip to VARXXXX’ – target item is the current item {}

But I want to get rid on this and not to show to user like C#, java languages

function skipOP(alpha varToSKP)
try {
skip to varToSKP;
}
Catch {
}
end;

Can I go to implementation like that?

Thanks in advance

Leulae

Re: Try Catch

Posted: June 13th, 2017, 1:44 pm
by josh
We don't have anything like that in CSPro. You could try the following:
if getsymbol() <> varToSKP then
   
skip to varToSKP;
endif
You might also look at using "move to" instead skip. That does skip for fields ahead of the current field and does a reenter for the current fields or previous fields.