Problem with MARKEDONLY filter.

easy-navieasy-navi Member Posts: 31
Hello,

My problem is:
I have a table and some records are set as MARKED. And now I need to SHOW ONLY NON-MARKED records.
I don't know how to set such a filter. :shock: I tried
record.MARKEDONLY(false)
but it didn't gave a result. ](*,)
Please help,
http://www.reinwestuj.pl Inwestuj w nieruchomości. Condohotele, aparthotele.

Comments

  • JedrzejTJedrzejT Member Posts: 267
    Hello,

    Well function Rec.MARKEDONLY(TRUE); can show only marked =TRUE.
    I think You have to invert marking before that..

    From Help:
    Activates a special filter. After you use this function, your view of the table only includes records marked by this function.
    [IsMarkedOnly :=] Record.MARKEDONLY([SetMarkedOnly])

    Parameters
    Record
    Type: Record

    A record from the table for which you want to activate the special 'mark' filter.
    SetMarkedOnly
    Type: Boolean

    Changes the state of the special filter. This parameter is optional.

    If this parameter if true, only marked records are included. If this parameter is false, all records are included.
  • AlbertvhAlbertvh Member Posts: 516
    Not sure where you are checking but you can do this.

    IF NOT Rec.MARK THEN BEGIN
    do whatever you need to do
    END;
  • SogSog Member Posts: 1,023
    Albertvh wrote:
    Not sure where you are checking but you can do this.

    IF NOT Rec.MARK THEN BEGIN
    do whatever you need to do
    END;
    Before you show the records best to replace the markings
    markedonly(false)
    repeat
    rec.mark := not rec.mark;
    until next = 0;
    thus reversing the marks
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • easy-navieasy-navi Member Posts: 31
    Albertvh wrote:
    Not sure where you are checking but you can do this.

    IF NOT Rec.MARK THEN BEGIN
    do whatever you need to do
    END;
    Ok, it works :) Thx

    I needed to delete UNMARKED records and leave only MARKED. Here is my code:
    IF rec.FINDFIRST THEN
    REPEAT
    IF NOT rec.MARK THEN
    rec.DELETE;
    UNTIL rec.NEXT = 0;

    p.s.
    First I tried to do this way (but it don't work):
    rec.MARKEDONLY(false);
    Rec.DELETEALL;
    http://www.reinwestuj.pl Inwestuj w nieruchomości. Condohotele, aparthotele.
Sign In or Register to comment.