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 / Cannot use Integers in...
Power Automate
Answered

Cannot use Integers in Filter Array actions

(2) ShareShare
ReportReport
Posted on by 205
Hi Experts,
 
I want to filter one of the Number column from the table (Data Source)
So i am using Filter Array as below :
 
Finding Age is a days column in which we have numbers in range of 1 to 64 , here i want to list out only less than 8 days rows only.
 
I am getting below errors when test it .
 
"The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@lessOrEquals(item()?['Finding Age'], 8)' failed: 'The template language function 'lessOrEquals' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Integer' that do not match.'."
 
I think Instead of 8 , we have to define something correctly.
Please help to solve this action?
 
Thanks
DK
Categories:
I have the same question (0)
  • Verified answer
    Chriddle Profile Picture
    8,441 Super User 2025 Season 2 on at
    The 8 on the right side is fine (if there are no spaces or other invisible characters).
    Excel sends these values as strings. Therfore use the int() expression to convert them.
  • DineshK_ Profile Picture
    205 on at
    @Chriddle : I have tried like the below in filter array but still the same error exists :
     
    @lessOrEquals(int(item()?['Finding Age'], 8))
     
    "The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@lessOrEquals(int(item()?['Finding Age'], 8))' failed: 'The template language function 'int' expects one parameter: the value that is to be converted to an integer. The function was invoked with '2' parameters. Please see https://aka.ms/logicexpressions#int for usage details.'."
  • Chriddle Profile Picture
    8,441 Super User 2025 Season 2 on at
    try this:
    @lessOrEquals(int(item()?['Finding Age']), 8)
     
  • DineshK_ Profile Picture
    205 on at
    Perfect , it is working fine and in my table the data column is not displayed properly..
    What should be the date format should be given in the source?
     
     
    In the output table :
     
    Data Operation used to create this output table :
     
     
  • Verified answer
    Chriddle Profile Picture
    8,441 Super User 2025 Season 2 on at
    In the Excel connector's "advanced options" you will find "DateTime Format".
    Set this to ISO 8601.
    Then you will get Power Automate date strings. Use formatDateTime() to convert them to the desired format.

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard