IsNumeric

IsNumeric

How to Use the Power Fx IsNumeric  Function in Power Apps

In this article, we will explore how to use the Power Fx IsNumeric function in Power Apps. We will discuss what this function does, how it works, and provide examples of how it can be used in your own apps.

What is the Power Fx IsNumeric Function?

The IsNumeric function in Power Fx is used to determine whether a value is numeric or not. This function takes a single argument, which can be of any data type. The function returns a Boolean value of true or false depending on whether the argument is numeric or not.

How Does the Power Fx IsNumeric Function Work?

The IsNumeric function works by checking whether the input value can be converted to a number. If it can be converted to a number, the function returns true. If it cannot be converted to a number, the function returns false.

For example, if the input value is “123”, the function will return true, because “123” can be converted to a number. However, if the input value is “abc”, the function will return false, because “abc” cannot be converted to a number.

How to Use the Power Fx IsNumeric Function

Now that we know what the Power Fx IsNumeric function does and how it works, let’s take a look at how to use it in Power Apps.

To use the IsNumeric function, you first need to open the Power Apps Studio and create a new canvas app. Once you have created your app, you can add a text input control to the screen.

Next, you can add a button control to the screen, and set the OnSelect property of the button to the following formula:


If(IsNumeric(TextInput1.Text), Notify(“The input is numeric”), Notify(“The input is not numeric”))


This formula uses the IsNumeric function to check whether the value of the text input control is numeric or not. If the value is numeric, the formula displays a notification message that says "The input is numeric". If the value is not numeric, the formula displays a notification message that says "The input is not numeric".

You can test this formula by entering a numeric value, such as "123", into the text input control and clicking the button. You should see a notification message that says "The input is numeric". If you enter a non-numeric value, such as "abc", you should see a notification message that says "The input is not numeric".

The Power Fx IsNumeric function is a powerful tool for checking whether a value is numeric or not in Power Apps. By following the steps outlined in this article, you can easily incorporate this function into your own apps and ensure that your users are entering valid numeric values.

Power Apps Training Courses by G Com Solutions (0800 998 9248)

Copyright, G Com Solutions Ltd, 2024.
Tower Bridge Business Centre, 46-48 East Smithfield, London E1W 1AW
0800 998 9248   |   9:00 a.m. till 5:30 p.m.

Connect With Me: