> ## 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/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/getlistitemcommand-01.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=0cdd97b310954f47f74166adf796dfe5" alt="获取列表项指令参数面板" width="639" height="403" data-path="helpcenter/commands/data-processing/images/getlistitemcommand-01.png" />

    | 参数      | 说明                                                       |
    | ------- | -------------------------------------------------------- |
    | **列表**  | 输入要获取数据的列表变量。                                            |
    | **项位置** | 输入要获取的列表项位置。`0` 表示第 1 项，`1` 表示第 2 项；支持负数，`-n` 表示倒数第 n 项。 |
  </Tab>

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

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/getlistitemcommand-02.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=18ae6d3bba52d0c565e6895ce038de5a" alt="获取列表项使用示例 - 创建列表变量" width="642" height="439" data-path="helpcenter/commands/data-processing/images/getlistitemcommand-02.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/getlistitemcommand-03.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=6b48ed54b6164d54125b185f4dc14e7c" alt="获取列表项使用示例 - 流程搭建" width="595" height="108" data-path="helpcenter/commands/data-processing/images/getlistitemcommand-03.png" />

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

1. 编辑列表变量，将列表内容设置为 `1, 2, 3`。
2. 执行【获取列表项】，将项位置设置为第 3 项。
3. 指令返回数值 `3` 并保存到“列表项”变量，供后续判断或数据处理使用。

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/getlistitemcommand-04.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=d32c3b896b83f8864de9e2e82e30fb85" alt="获取列表项效果展示" width="896" height="189" data-path="helpcenter/commands/data-processing/images/getlistitemcommand-04.png" />

第 3 项的结果为 `3`。

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