Thank you for your feedback! You have rated this topic in the last 30 days.
Sorting and Grouping
Topic Overview
Purpose
This topic provides reference information about the recordable user methods for testing the sorting and grouping user actions in xamDataPresenter™ controls.
The following table briefly explains the recordable methods for testing the control. Detailed information about the methods is provided in the text blocks following the table.
Method
Description
CollapseGroupField
Collapse the specified FieldGroup.
ExpandGroupField
Expand the specified FieldGroup.
GroupByField
Groups the data by the specified field.
SortField
Sorts the specified field.
UnGroupField
Groups the data by the specified field.
CollapseGroupField
Description
The CollapseGroupField method is used for recording and replaying of GroupField collapsing.
Details
The method accepts as a parameter the name of the GroupField to be collapsed and the index of the field layout in which it is located.
Parameters
The following table explains the method’s parameters along with some sample code.
Method parameter
Description
sGroupFieldName
iFieldLayoutIndex
The parameters are: name of the GroupField and the index of the field layout which contains the GroupField.
The GroupByField method is used for recording and replaying the grouping of data by a specified field performed by the user.
Details
This method takes a header path and the position of the grouping indicator in the group-by area as required parameters.
The path is formed by concatenating the record path and the field name or index (the parenthesis and the brackets are part of the syntax):
{record path}[field name or field index]
For a field identification can be used either the field header or field index.
For example, the cross-section of the first record and the field name is denoted as {0}[name], the cross-section of the first child record of the first record and the field name is denoted as {0}{0}[name] .
Parameters
The following table explains the method’s parameters along with some sample code.
Method parameter
Description
Header path
(required)
Group-by indicator position in the group-by area
Using the header path and its position in the group-by area as parameters.
Example
Grouping by the name field; the group-by indicator is placed at the first position in the group-by area.
The first grouped record is expanded and grouping by the description field is performed next. The description group-by indicator is placed at the second position after the name group-by indicator.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
Exception name
Exception description
Possible reasons
The following items have not been found.
The specified item(s) cannot be located when replaying the method.
The path to the selected item is not correct.
The argument is malformed.
The parameter is not formatted correctly.
The method’s parameter is not formatted correctly.
Group-by support is not enabled.
The grouping fails when replaying the method.
The Group-by functionality is disabled.
The group-by position is out of range.
The group-by indicator cannot be positioned when replaying the method.
The group-by indicator position is not correct.
SortField
Description
The SortField method is used for recording and replaying the sorting of a specified field.
Details
This method takes the field’s path and the sort order as required parameters. There is also one optional Boolean parameter which is used when sorting of multiple fields is performed.
The path is formed by concatenating the record path and the field name or index (the parenthesis and the brackets are part of the syntax):
{record path}[field name or field index]
For a field identification can be used either the field header or field index.
For example, the cross-section of the first record and the field name is denoted as {0}[name], the cross-section of the first child record of the first record and the field name is denoted as {0}{0}[name] .
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
Exception name
Exception description
Possible reasons
The following items have not been found.
The specified item(s) cannot be located when replaying the method.
The path to the selected item is not correct.
The argument is malformed.
The parameter is not formatted correctly.
The method’s parameter is not formatted correctly.
Sorting not enabled for the supplied field.
Sorting cannot be performed when replaying the method.
The Sorting functionality is disabled.
UnGroupField
Description
The UnGroupField method is used for recording and replaying the ungrouping of data.
Details
This method takes a header path as a required parameter.
The path is formed by concatenating the record path and the field name or index (the parenthesis and the brackets are part of the syntax):
{record path}[field name or field index]
For a field identification can be used either the field header or field index.
For example, the cross-section of the first record and the field name is denoted as {0}[name], the cross-section of the first child record of the first record and the field name is denoted as {0}{0}[name] .
Parameters
The following table explains the method’s parameters along with some sample code.
This topic provides reference information about the recordable user methods for testing the navigation and selection actions in xamDataPresenter controls.