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:
Thank you for your help in advance!
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?
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
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2