ValueAction.NativeStatement

Updated on

ValueAction.NativeStatement is a Power Query M function that creates an action to execute a statement against a target using specified parameters and options. The behavior of the action is defined by the target.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

ValueAction.NativeStatement(
   target as any,
   statement as text,
   optional parameters as any,
   optional options as nullable record,
) as any

Description

Creates an action that executes statement against target using the parameters specified in parameters and the options specified in options.

The behavior of the created action is defined by target.

target provides the context for the operation described by statement.

statement describes the action to be taken against target. statement is expressed in a manner specific to target (for example, a T-SQL statement).

The optional parameters value may contain either a list or record as appropriate to supply the parameter values expected by statement.

The optional options record may contain options that affect the execution behavior of statement against target. These options are specific to target.

The returned action will perform the described operation when executed. The action returns a meaningful value representing the outcome of the operation (for example, a status code, the number of rows affected, and so on).

The function will raise an evaluation error if invalid input arguments are detected (before trying to perform the operation).

The action will raise an execution error if the operation cannot be successfully completed.

NOTE: target may be left in an undefined state if an execution error occurs.

Other functions related to ValueAction.NativeStatement are:

Contribute » | Contributors: Rick de Groot

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy