Clean buffer

Discussions about CSEntry
Mariovaisman
Posts: 80
Joined: February 11th, 2013, 8:26 am

Clean buffer

Postby Mariovaisman » August 23rd, 2018, 8:06 am

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: 1049
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Clean buffer

Postby Gregory Martin » August 24th, 2018, 8:34 am

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;


Return to “Entry”