Removes specified fields from a record | ลบฟิลด์ที่ระบุออกจาก Record
=Record.RemoveFields(record as record, fields as any, optional missingField as nullable number) as record
=Record.RemoveFields(record as record, fields as any, optional missingField as nullable number) as record
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
| record | record | Yes | The input record to modify | |
| fields | any | Yes | Field name(s) to remove – either a single text value or a list of field names | |
| missingField | nullable number | Optional | null | Optional parameter for handling missing fields |
Record.RemoveFields([CustomerID = 1, Item = "Fishing rod", Price = 18.00], "Price")=Record.RemoveFields([CustomerID = 1, Item = "Fishing rod", Price = 18.00], "Price")
[CustomerID = 1, Item = "Fishing rod"]
Record.RemoveFields([CustomerID = 1, Item = "Fishing rod", Price = 18.00], {"Price", "Item"})=Record.RemoveFields([CustomerID = 1, Item = "Fishing rod", Price = 18.00], {"Price", "Item"})
[CustomerID = 1]
let Customer = [ID = 1, Name = "Alice", TempID = "ABC", ProcessFlag = true], Cleaned = Record.RemoveFields(Customer, {"TempID", "ProcessFlag"}) in Cleanedlet
Customer = [ID = 1, Name = "Alice", TempID = "ABC", ProcessFlag = true],
Cleaned = Record.RemoveFields(Customer, {"TempID", "ProcessFlag"})
in
Cleaned
[ID = 1, Name = "Alice"]
Record.RemoveFields removes specified fields from a Power Query record. You can remove a single field by name or multiple fields by providing a list. If a field doesn’t exist, an exception is thrown unless handling is specified.
ฟังก์ชัน Record.RemoveFields ใช้สำหรับลบฟิลด์ที่ระบุออกจาก Record ใน Power Query สามารถลบฟิลด์เดียวหรือหลายฟิลด์พร้อมกันได้โดยส่งเป็นรายการ เหมาะสำหรับการทำความสะอาดข้อมูลหรือลบฟิลด์ที่ไม่ต้องการออกจาก Record