---
title: Record.FieldValues – คืนค่าข้อมูลทั้งหมดใน Record เป็น List
url: https://www.thepexcel.com/functions/power-query/record-functions/record-fieldvalues/
type: function-explainer
program: Power Query
syntax: Record.FieldValues(record as record) as list
date: 2025-12-04
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 3
  usefulness: 5
---

# Record.FieldValues – คืนค่าข้อมูลทั้งหมดใน Record เป็น List

> ดึงค่าทั้งหมดจาก Record

## คำอธิบาย

คืนค่าข้อมูล (Values) ทั้งหมดจาก Record เป็น List

## Syntax

```excel
Record.FieldValues(record as record) as list
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| record | Yes | record |  | Record ที่ต้องการดึงค่าข้อมูล |

## เคสการใช้งาน

### แปลง Record เป็น List

ใช้เมื่อต้องการนำข้อมูลใน Record ไปประมวลผลต่อในรูปแบบ List เช่น หาผลรวม, หาค่าเฉลี่ย (ถ้าข้อมูลเป็นตัวเลข)

### เปรียบเทียบข้อมูล

ใช้ดึงค่าออกมาเพื่อเปรียบเทียบกับ List อื่น

## ตัวอย่าง

### 1. ตัวอย่างที่ 1: ดึงค่าจาก Record ทั่วไป

```excel
Record.FieldValues([x = 1, y = 2, z = 3])
```

**ผลลัพธ์:** `{1, 2, 3}`

ดึงค่า 1, 2, และ 3 ออกมาเป็น List

### 2. ตัวอย่างที่ 2: Record ที่มีข้อมูลต่างชนิดกัน

```excel
Record.FieldValues([Name = "Alice", Age = 25, IsMember = true])
```

**ผลลัพธ์:** `{"Alice", 25, true}`

List ที่ได้จะเก็บค่าตามชนิดข้อมูลเดิม (Text, Number, Logical)

### 3. ตัวอย่างที่ 3: Record ว่าง

```excel
Record.FieldValues([])
```

**ผลลัพธ์:** `{}`

ไม่มีข้อมูลใน Record จึงได้ List ว่าง

## ฟังก์ชันที่เกี่ยวข้อง

- [Record.FieldNames – ดึงชื่อ Field ทั้งหมดจาก Record](https://www.thepexcel.com/functions/power-query/record-functions/record-fieldnames/)
- [Record.ToList – แปลง Record เป็น List ของค่าข้อมูล](https://www.thepexcel.com/functions/power-query/record-functions/record-tolist/)
- [Record.Field – ดึงค่า Field จาก Record](https://www.thepexcel.com/functions/power-query/record-functions/record-field/)

## แหล่งข้อมูลเพิ่มเติม

- [Microsoft Learn: Record.FieldValues](https://learn.microsoft.com/en-us/powerquery-m/record-fieldvalues) _(Official Documentation)_

---

_Source: [https://www.thepexcel.com/functions/power-query/record-functions/record-fieldvalues/](https://www.thepexcel.com/functions/power-query/record-functions/record-fieldvalues/)_
