A few days ago Microsoft announced the creation and use of function in Microsoft Dataverse (currently in preview). Functions use Power Fx to execute a set of commands within Dataverse that run on the server-side. Late last year, Microsoft announced low-code plug-ins in Dataverse which can be executed as Instant or Automated low-code plug-ins. The newly pre-released functions will be a replacement of the Instant low-code plug-ins which are being deprioritized any replaced.
To create a function within a solution in the Maker Portal, we add a new automation component to our solution called Function as shown in the image below.

We will need to provide the Display Name and Description of the new function, Input and/or Output parameters. In the Table Reference we can optionally select the tables, and then access them via the Filter and Lookup function in Canvas applications, and finally we will enter the Power Fx expression in the Formula bar.
In the screenshot below, we can see a calculation of the Total Sales Price by passing Subtotal, Tax Percentage, Shipping cost and getting an output parameter of the total cost.

Once the function is Saved, you will see various components added to the solution. You will see a Custom API, Function, FxExpression, and then a Custom API Request Parameter for each of the Input Parameters and a Custom API Response Property for the Output result as shown in the screenshot below.

In order to test this function, you can create an unbound action within Power Automate, pass the required parameters and see the output as shown in the image below:
