Hello Everyone -
I have a Query defined as below and I need to delete some particular records in the grid/browser without modifying the Grid Filter criteria.
I am using the below way:
But with this it's not deleting the last record of the result set, if that matches my condition (The problem is only happening if the Last record is also matching with condition, this above code is not deleting the Last record).
For the Browser properties I checked and for that Browse the Multiple-Selection is "unchecked".
and for the browser I really donlt want the Multiple selection.
But when I set in "Local-Initialize" the
{&BROWSE-NAME}:multiple in frame {&frame-name} = yes.
Then the above code works well i.e. it will be able to delete the last record as well if that matches the condition.
Could anyone help, what Can i do for that, as I don't want the Multiple selection for that Browser.
Can I again set the Multiple property to False after by things done, if yes, then where I could do that?
Thanks in Advance.
I have a Query defined as below and I need to delete some particular records in the grid/browser without modifying the Grid Filter criteria.
I am using the below way:
Code:
/************************************************/
OPEN QUERY q1 FOR EACH ttNumbers.
RUN remove_browse_records.
PROCEDURE remove_browse_records:
DEFINE VARIABLE vRowid AS ROWID NO-UNDO.
GET FIRST q1.
DO WHILE AVAILABLE(ttNumbers):
IF ttNumbers.nField = 1 OR ttNumbers.nField = 3 OR
ttNumbers.nField = 5 OR ttNumbers.nField = 7 OR
ttNumbers.nField = 9 THEN DO:
vRowid = ROWID(ttNumbers).
REPOSITION q1 TO ROWID vRowid.
b1:SELECT-FOCUSED-ROW().
b1:DELETE-SELECTED-ROWS().
END.
GET NEXT q1.
END.
END PROCEDURE.
/************************************************/
But with this it's not deleting the last record of the result set, if that matches my condition (The problem is only happening if the Last record is also matching with condition, this above code is not deleting the Last record).
For the Browser properties I checked and for that Browse the Multiple-Selection is "unchecked".
and for the browser I really donlt want the Multiple selection.
But when I set in "Local-Initialize" the
{&BROWSE-NAME}:multiple in frame {&frame-name} = yes.
Then the above code works well i.e. it will be able to delete the last record as well if that matches the condition.
Could anyone help, what Can i do for that, as I don't want the Multiple selection for that Browser.
Can I again set the Multiple property to False after by things done, if yes, then where I could do that?
Thanks in Advance.
Last edited by a moderator: