web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter Select Action O...
Power Automate
Unanswered

Filter Select Action Output Array to Only get Numeric Values

(0) ShareShare
ReportReport
Posted on by
llo,
 
I have an array of strings that contains both words and numbers.  I want to filter the array to only show the items that are exclusively numeric.  In other words, I only want the items whose value is like "12345" and I do not want items that contain values like "abcdef" nor "abc123def".
 
The array is coming from a Select action and the raw output looks like this.  

 
 
 
{
    "body": [
        {
            "Text Values": [
                "PREVIOUS SHIFT",
                "37868",
                "SECONDS",
                "TOTAL TIME",
                "58402",
                "SECONDS",
                "2 SHIFTS PREVIOUS",
                "34247",
                "SECONDS",
                "DAY TIME STAMP",
                "32084",
                "SECONDS"
            ]
        }

 
 
 
I've tried using the Filter Array action to filter out non-numeric items like so... 

 
 
 
          
 
 
 
          
 
 

 
But I get the following error on the Filter Array when I run the flow.
 
 
 
 
Action 'Filter_array' failed: The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@equals(isInt(item()),true)' failed: 'The template language function 'isInt' expects its first parameter 'string' to be a string. The provided value is of type 'Object'. Please see https://aka.ms/logicexpressions#isInt for usage details.'.
 
 
I would like the final output to be an array or table that contains only the numeric values.
 
 
Help please!
Categories:
I have the same question (0)
  • Suggested answer
    Ellis Karim Profile Picture
    11,657 Super User 2025 Season 2 on at
    Try:

     
    In the filter array action, I used the following expression in the FROM property:
     variables('varData')?['body']?[0]?['Text Values']
     
    Switch the Filter Array mode to Advanced Mode:
     
    Use the following query:
    @isInt(item())
     
     
    The runtime output is:
     
    Remember that the output will be an array of "strings". Use the int function to convert to integers.





    This is the runtime output:


    Ellis
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 506 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard