Hello,
I setup a flow to extract ids from folders that all share the same display name format of 'Country Name - CountyAssignedID', with the exception of some having an additional hypen '-', so 'County Name - Additional Name - CountyAssignedID'. Each of the country assigned ids have leading zeros. Example: 'Harris - County - 00260002'. The goal of my flow is to extract the country assigned id without any leading zeros and compare it against a given id inputted in my manual trigger form, which I have accomplished for the majority of the folder names, but just recently noticed that some (small pool) are failing and resulting in this error:
"The execution of template action 'Filter_array_2' failed: The evaluation of 'query' action 'where' expression '@equals(int(replace(substring(item()?['DisplayName'], add(lastindexOf(item()?['DisplayName'], '-'), 2), sub(length(item()?['DisplayName']), add(lastindexOf(item()?['DisplayName'], '-'), 2))), '^0+', '')), int(replace(outputs('input_countyName'), '[^a-zA-Z0-9 ]+', '')))' failed: 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type."
Not sure how to resolve this considering most of them are working, its just a small handful of them that are failing. I did attempt to go through and rename each folder that failed to ensure there were no special characters that I could be missing but that didnt resolve the issue. Any suggestions?