Working to create a script which iterates over a set of CSV files and then joins to a ZIP file. One that is completed, it goes through to Select by Attribute to ensure we are looking only true values and not null.
I have the model written and it works well on the first pass, but when it comes to the next file it fails because the Select Layer by Attribute is looking for the previous filename. How can I pass the filename as a variable? Is this possible?
I have referenced the below article without any luck in having it work either.
Any help to get this working would be greatly appreciated.
Solved! Go to Solution.
I am not sure why I didn't think of this sooner. So I was able to get the %Variable% working as it should, but then I couldn't get the second half working such as '.csv.REV_SUB_TOTAL'
I added it as its own Variable called %String% and then changed my SQL statement to %Name%%String% IS NOT NULL and it worked!
I am not sure why I didn't think of this sooner. So I was able to get the %Variable% working as it should, but then I couldn't get the second half working such as '.csv.REV_SUB_TOTAL'
I added it as its own Variable called %String% and then changed my SQL statement to %Name%%String% IS NOT NULL and it worked!
I'm using a ModelBuilder to select Multiple values from a layer and it is not working. It only works when I select a single value. What am I doing wrong please.
Model:
Select Layer By Attribute expression window:
Parameter:
Geoprocessing:
In the window below marked in red, if I only put one value (SPB) then it will select, however if I put multiple values (SPB, EAB, etc.) as shown below it will not select.
I've added a variable to the model that would allow me to put Multiple values.
Please help me.
Thank you,
Abi