What is Power Fx ?

Microsoft Power Fx is the new programming language for Microsoft PowerApps applications.

It is a strongly typed, declarative, and functional language that is written in simple text in an Excel-like formula bar.

Power Fx is used to link objects together with declarative spreadsheet-like formulas.

The programming code can be written based on the user’s programming level of maturity starting from basic level to expert level.

What are some Power Fx codes examples ?

Here are some examples of Power Fx commands and how they can be used :

  • This is how you write the text – “Hello World”

Notify (“Hello. World!”)

  • To change the created date formula from the default option to Month Date, you would add this code to the “On Select” property of the date field.

Text(DateTimeValue(ThisItem.’Created On’), “mmmm d”, “en-US”)

  • This is how you can add a confirmation dialog, asking the user to confirm deletion of a record before it is removed.

If( Confirm( “Are you sure?” ), Remove( ThisItem ) )

  • This is how you can add a print button to a form. This function can be used to save the form data as a pdf on the user’s computer before the form is submitted.

PRINT ()

  • To navigate from an editable form back to the list of records, you can add this command to the back button or icon

Navigate( Gallery1.Selected )