Ln Function from Power Fx Using Power Apps

Power Apps is a suite of apps, services, connectors and data platform that provides a rapid application development environment to build custom apps for your business needs. More Details https://docs.microsoft.com/en-us/powerapps/powerapps-overview.

Power Fx is the low-code language that will be used across Microsoft Power Platform. It's a general-purpose, strong-typed, declarative, and functional programming language.

The Ln function returns the natural logarithm (base e) of its argument.

Reading this article, you can learn how to perform Ln function from Power Fx using in Microsoft Power Apps. Also, you will be able to learn Button control, Label control and TextInput control in the Power Apps environment.

Step 1. Open the URL https://powerapps.microsoft.com/en-us/ in the browser for Power apps.

Create an account with your Organisation Mail ID and login it, After login your Power Apps account.

Power Apps account

Step 2. First, Click Create (+ ) and Select the Canvas app from blank.

Canvas app

Create Canvas app

Next, Give the App name as PAPFLn and Format as Tablet.

Canvas app from blank

Now, In the Power Apps studio environment, Select the Create a form option.

Create form

Step 3. To test the Ln function, First Rename the Screen name as SCRPAPF.

Next, Insert a Label control and set the Name and Text property as LblTitle and Ln function in canvas App using PowerFx with Power apps.

Text level

Next, Insert a Label control and set the Name and Text property as LblInput and Enter Your Input.

Insert

Insert a TextInput control and set the Name property as TxtNum and Format property as Number.

Text Input

Insert a Button control and set the Name property as BtnCal and Text property as Calculate and set OnSelect action as UpdateContext({RES:(TxtNum)}) for testing Ln Power Fx.

Button

Insert Label control and set the Name property as LblRes and Text property as "The Ln Value is : " &Ln(RES.Text) for displaying Results.

Ln value

Insert a Button control and set the Name property as BtnClr, Text property as Clear and OnSelect Property in Action as Reset(TxtNum); UpdateContext({LblRes:""}); for reset the TextNum and Result.

Button

Finally the form design is look like.

PowerFx

Step 4. Now we can see the preview of your App in Power Apps Studio, and The output of the PAPFLn is.

Ln function

After clicking the Calculate Button, The Browser Display is.

Calculate

The Tablet Display is.

Tablet display

The Apple iPhone Display is.

iPhone display

After clicking the Clear Button.

Clear button

Summary

Now, you have successfully tested the Power Fx - Ln function in Power Apps Studio environment.


Similar Articles