Assign: Cannot perform '<' operation on System.String and System.Int32


I’m a beginner to uipath and i’m creating a automation to extracting price and name from lazada(e-commerce website) and filter it <5 dollars and >5 dollars but whenever i run the project it throws a error like this Assign: Cannot perform ‘<’ operation on System.String and System.Int32. I’m using assign activity to filter out the datatable ExtractDataTable.Select(“Price<5”).CopyToDataTable
Can anyone help me do solve this.

Thank you so much for your time.

Welcome to the forum

as string and Int32 are different datatypes you have to bring it on a same base. In your case on Int.

I assume that you want to compair the value from a price column.

Give a try on:
ExtractDataTableFiltered.Select(“Convert([Price], System.Int32) < 5”).CopyToDataTable

1 Like

Thank you for the help buddy but after i change it to ExtractDataTableFiltered.Select(“Convert([Price], System.Int32) < 5”).CopyToDataTable i got and error like this
Assign: Cannot find column [Price]. My column name is Price in my excel sheet but i dont know why its showing like this. Please help me
Thank you so much

Check for this typo in my Post: ExtractDataTableFiltered vs. ExtractDataTable and use your var name
Check in Excel if in the cell with the header name Price a space before or after is present. This often occurs and leads to this issue

Ya i changed the variable name.
No buddy my there is no space before and after the Price and i run several times and changed the header name several times too but its still throws the same error Assign: Cannot find column [Header Name]