正解:D
To filter rows in a DataTable based on a condition (e.g., Quantity > 500), the best activity to use is Filter Data Table.
Why is Option D Correct?
* Filter Data Table allows filtering rows based on specific conditions (e.g., Quantity > 500).
* It can be configured via UI settings or using expressions in the advanced filter options.
* The result is stored in a new or existing DataTable.
Example Usage in UiPath Studio:
* Drag the Filter Data Table activity into the workflow.
* Set Input DataTable = dtInput
* Set Output DataTable = dtFiltered
* Configure the filter condition:
vbnet
CopyEdit
Column: "Quantity"
Operator: "Greater than"
Value: 500
* Now, dtFiltered contains only rows where "Quantity" > 500.
Why Other Options Are Incorrect?
* A (Sort Data Table) #
* Sort Data Table only sorts data; it does not filter rows.
* B (Output Data Table) #
* Converts the DataTable into a string representation, used for display purposes, not filtering.
* C (Lookup Data Table) #
* Searches for specific values in a column but does not filter multiple rows.
References:
* UiPath Documentation - Filter Data Table
* UiPath Forum - Filtering DataTable Efficiently