Power Automate isInt() Function

Do you know how to use the isInt() function in a Power Automate flow? In this tutorial, I will explain the Power Automate isInt() function, its syntax, and an example of the isInt() function with Power Automate flows.

To check if a string is only the number, use the isInt() string expression inside a Power Automate flow. Example: isInt(triggerBody()[‘text’]).

Power Automate isInt() Function

The isInt() function in Power Automate helps check if the provided string is only a number or an integer. If the string is an integer, then it returns the boolean value as ‘true’; else gives the output as ‘false’.

Power Automate Syntax for isInt() Function

The Power Automate isInt() function syntax will be as shown below

Syntax: isInt(‘<string>’)

Where the string value is mandatory, that should need to be examined.

Example: isInt(’10’) -> Return the output as ‘true’ when it is a number [or] returns the output as ‘false’ when it is a string.

Power Automate isInt() Function Examples

Now, I will explain the isInt() function by creating an ‘Instant cloud flow’ that will trigger manually.

Example:-1

For that, let’s follow the steps that are mentioned below.

1. Create an ‘Instant cloud flow’ in Power Automate.

Instructions: Navigate to https://make.powerautomate.com to open the Power Automate Home page -> Click +Create -> Select ‘Instant cloud flow’ -> In the next window, Provide a flow name & select trigger ‘Manullay trigger a flow’ -> Tap Create button -> Inside the trigger, add a text input.

Power Automate check if string is number

2. After that, add an ‘Initialize variable’ flow action to store the values of text during the flow and set details of the variable like Name, Type, and Value.

isInt(triggerBody()['text'])
Power Automate flow check if string is only number

3. Now, add the ‘Compose’ data operation to check the output from the isInt() expression.

Power Automate check if string is integer

4. Once the flow is done, click on Save and Test. Test the flow Manually. In the Runflow window, provide the value as shown below -> Click on Runflow.

Power Automate isInt() function

5. When the flow runs successfully, open the ‘Compose’ flow action to check the output if the string is a number.

isInt() function expression in Power Automate

Example:-2

Here, I will show you one more example of the isInt() function, taking the SharePoint list as a reference in an Automated cloud flow.

Let us create a Power Automate ‘Automated cloud flow’ that will trigger automatically when an item is created in a SharePoint list.

For that, I have used one of the SharePoint lists named ‘Employee Resignation Log’ with ‘Employee ID’ as the ‘Title’ column, by default ‘Single line of text’ column.

Power Automate expressions how to use isInt()

In the SharePoint list, we need to check if the provided ‘Employee ID’ is a number or not.

Follow the same steps that are mentioned in the above example.

1. In Power Automate, create an ‘Automated cloud flow’ with a trigger ‘When an item is created’. Set the details like Site Address and List Name.

How to use the Power Automate isInt() function

2. Under the trigger, add an ‘Initialize variable’ flow action and set the Name, Type, and Value for the variable.

  • Value: Add value from the dynamic content.
Power Automate string functions isInt()

3. In the ‘Compose’ flow action, add the isInt() expression along with the variable, as shown below.

Using isInt() function in Power Automate

4. Now the flow is ready, Save the flow. Test it Manually. After that, add an item to the connected SharePoint list.

5. When the flow runs successfully, it will display the output in the compose data operation. If the isInt() function satisfies, then it returns ‘true’; else, it will return as ‘false’.

String Function isInt() in Power Automate

This is how to use the Power Automate isInt() expression to check if the string is only a number.

Conclusion

In this Power Automate tutorial, I have explained how to use the isInt() function in Power Automate. I have explained the syntax of the Power Automate isInt() function and a few examples of how to use the isInt() function in Power Automate with examples.

You may like the following tutorials: