MARKEDONLY Function (Record)

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.

Type: Boolean

true if the special filter is in use; otherwise, false.

This example shows how to use MARK and MARKEDONLY. Assume that initially none of the records are marked.

This example requires that you create the following variables and text constants in the C/AL Globals window.

Variable name DataType Subtype

CustomerRec

Record

Customer

No1

Integer

 

No2

Integer

 

Text constant ENU value

Text000

Number of records before MARKEDONLY: %1.\

Text001

Number of records after MARKEDONLY: %2.

CustomerRec.SETCURRENTKEY("No.");
CustomerRec."No." := '10000';
CustomerRec.FIND('=');
CustomerRec.MARK(TRUE); // Mark a record.

No1 := CustomerRec.COUNT;
CustomerRec.MARKEDONLY(TRUE);
No2 := CustomerRec.COUNT;
MESSAGE(Text000 + Text001, No1, No2);

The following messages could be displayed:

Number of records before MARKEDONLY: 68.

Number of records after MARKEDONLY: 1.

Community Additions

ADD
Show: