Muokkaa

Jaa


MediaSet.Count() Method

Version: Available or changed with runtime version 1.0.

Gets the number of media objects that are included in the MediaSet of a record.

Syntax

Count :=   MediaSet.Count()

Note

This method can be invoked using property access syntax.

Parameters

MediaSet
 Type: MediaSet
An instance of the MediaSet data type.

Return Value

Count
 Type: Integer
The number of media objects that are included in the MediaSet of a record.

Example

This example counts the number of media objects that are available for item No. 1000 in table 27 Item of the CRONUS demonstration database. In this example, the field in the Item table that is used for the MediaSet data type is Picture.

 var
    itemRec: Record Item;
    count: Integer;
    Text000: Label 'The number of media files: %1';
begin
    itemRec.Get('1000');  
        count := (itemRec.Picture.Count);  
        Message(Text000,count);  
end;

MediaSet Data Type
Get Started with AL
Developing Extensions