Clean buffer

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
Mariovaisman
Posts: 133
Joined: February 11th, 2013, 8:26 am

Clean buffer

Post by Mariovaisman »

Hello,

I would like to clean the current entry record during the dataentry process, for example the app complete the key, then advance to a multiple occurrence record, after completing some data, decides to return to the begining which is to type the key again. Up to here all is fine, however when the app goes to the first multiple occurrence record, it shows the old data that I want to clean. How I can do it, because when I try to ask how many records are, it always shows 0 records and cannot delete the old data.

Thanks

Mario
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Clean buffer

Post by Gregory Martin »

The clear function is basically what you want, but you can't call it on the main dictionary.

In your case, I would generally stop adding the case and then start a new case, but if that isn't possible, you could just set everything to notappl. Sometimes instead of trying to use totocc or count, I do this instead:
do numeric ctr = 1 while ctr <= maxocc(MY_REC_NAME) and visualvalue(FIRST_ITEM_ON_REC(ctr)) <> notappl then
    FIRST_ITEM_ON_REC(ctr) = notappl;
    // ...
enddo;
Post Reply