> ## Documentation Index
> Fetch the complete documentation index at: https://rpa.bazhuayu.com/helpcenter/llms.txt
> Use this file to discover all available pages before exploring further.

# 列表排序

## 指令说明

**描述：** 按照指定的排序方式重新排列列表中的数据项，并将排序结果保存到指定变量中。

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/data-processing/images/sortlistcommand-01.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=2c9a2cd99e6cb3c0014025723692899e" alt="列表排序指令参数面板" width="648" height="301" data-path="helpcenter/commands/data-processing/images/sortlistcommand-01.png" />

    | 参数       | 说明          |
    | -------- | ----------- |
    | **列表**   | 输入列表变量      |
    | **排序方式** | 选择升序或降序排列列表 |
  </Tab>

  <Tab title="高级">
    本指令暂无高级参数。
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/data-processing/images/sortlistcommand-02.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=b45eab1e69de2eef62786ffa5c15abc9" alt="列表排序使用示例 - 流程搭建" width="847" height="291" data-path="helpcenter/commands/data-processing/images/sortlistcommand-02.png" />

**该流程执行逻辑：**

1. 选择需要排序的列表变量。
2. 执行【列表排序】，按升序或降序等指定方式排列列表项。
3. 将排序后的列表保存到结果变量，供后续循环、取值或输出使用。

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/data-processing/images/sortlistcommand-03.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=050a90766e525f29a11b5ca69e18b1ab" alt="列表排序使用示例 - 效果展示" width="838" height="272" data-path="helpcenter/commands/data-processing/images/sortlistcommand-03.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/QLw4prvAN-mejJU5/helpcenter/commands/data-processing/images/sortlistcommand-04.png?fit=max&auto=format&n=QLw4prvAN-mejJU5&q=85&s=0c1c5170e558f88c08ff5161d791de08" alt="列表排序使用示例 - 效果展示" width="840" height="170" data-path="helpcenter/commands/data-processing/images/sortlistcommand-04.png" />

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
