Record.Ascending([Boolean]) Method
Version: Available or changed with runtime version 1.0.
Gets or sets the order in which the system searches through a table.
Syntax
[Ascending := ] Record.Ascending([Ascending: Boolean])
Note
This method can be invoked using property access syntax.
Parameters
Record
Type: Record
An instance of the Record data type.
[Optional] Ascending
Type: Boolean
Return Value
[Optional] Ascending
Type: Boolean
Example 1
The following example returns a value that indicates the current search order of the Customer table, to which MyRecord
record belongs. The return value is stored in the IsAscending
variable and displayed in a message box. In this example, the value Yes is displayed in the message box, which means that the search order is ascending. This is because the SetAscending
parameter is not used.
codeunit 50111 IsAscending
{
trigger OnRun()
var
MyRecord: Record Customer;
IsAscending: Boolean;
Text000: Text;
begin
IsAscending := MyRecord.Ascending;
Message(Text000, IsAscending);
end;
}
Example 2
The following example sets the current sort order to descending by setting the SetAscending
parameter to false. The value displayed in the message box is No.
codeunit 50111 IsAscending
{
trigger OnRun()
var
MyRecord: Record Customer;
IsAscending: Boolean;
Text000: Text;
begin
IsAscending := MyRecord.Ascending(false);
Message(Text000, IsAscending);
end;
}
See Also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈