Skip to main content
Community site session details

Community site session details

Session Id : m4qiRYa/3AJq7i9kBqm9ET
Power Automate - Building Flows
Unanswered

List rows table excel action - Odata Filter Query

Like (0) ShareShare
ReportReport
Posted on 4 Oct 2023 05:53:46 by 21

Hi All

 

I have a list rows table excel action and i want to filter the table where EmpID gt idNumber variable but I am getting an error that I have to use containswith, eq, ne and so on, which is not the operator I want. So I have tried using the int function for EmpID (e.g. expression: int('EmpID') gt iDNumber and tried int(item()?'EmpID') gt IDNumber) but its saying ''The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.'

 

Extra info: EmpID's data type in excel is number but PowerAutomate reads it as a string. Not sure why.

 

Please see screenshot below:

mg1308_1-1696398528748.png

 

 

Thank you for your help in advance!

  • mg1308 Profile Picture
    21 on 04 Oct 2023 at 07:04:21
    Re: List rows table excel action - Odata Filter Query

    hi @FLMike 

     

    Thanks for your reply! Oops forgot to add this but i did try that int(item()?['EmpID']) as well and its still giving me the same error. The trigger output of this flow is from PowerApp. This flow is grabbing the excel attachment in PowerApp when users clicks submit. In my automate, I am list rows in a table in excel. How would validate with a compose before the excel action when the column that i want to use is coming for OData Filter Query is from the excel file?

  • Michael E. Gernaey Profile Picture
    45,250 Super User 2025 Season 2 on 04 Oct 2023 at 06:25:16
    Re: List rows table excel action - Odata Filter Query

    Hi,

     

    You syntax is incorrect. You said it was a variable, but you are treating it like its in an Apply to each or a Filter Array.

     

     int(item()?'EmpID')
    
    Should be
    
    int(item()?['EmpID'])
    
    BUT if its a variable then it should be
    int(variables('EmpID'))

     

    But I would also validate with a Compose (before the Excel Filter/Action) that just spits out this

     

     item()?['EmpID'], int(item()?'EmpID')
    
    or if its a variable
    
    variables('EmpID'),int(variables('EmpID'))

     

    just to make sure you have values there.

     

    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete