Function.Invoke

Executes the provided function with the designated set of parameters and outputs the outcome.

Syntax

Function.Invoke(function as function, args as list) as any

About

Executes the provided function with the designated set of parameters and outputs the outcome.

Explanation

Utilize the Record.FieldNames function with a single argument [A=1,B=2]. To do this in Power Query MFunction.Invoke, use the following: MFunction.Invoke(Record.FieldNames, {[A = 1, B = 2]}). The output will be {"A", "B"}.