Hi all,
I'm trying to setup a model that pulls all feature layers from a hosted webservice (present in a Map) and selects and exports features from each feature layer that satisfies an SQL query to a new geodatabase.
The way I've set up my model is- A variable called ParkName prompts user to enter the name they want for the new geodatabase. An Iterate layers tool looks at all the feature layers within the webservice and each output layer is passed to Make Feature layer (with the required SQL) and Copy Features- to create feature layers with only the required features in a new geodatabase. I'm using inline variable substitution to give each layer the same name as their hosted counterpart. What I can't do is use inline variable substitution to have all these feature layers exported to the new geodatabase created earlier. It works perfectly when it's set to Default.gdb but not when it's set to %ExportGDB%
I have also tried setting the new gdb as a precondition and as the current/scratch workspace, and tried using the tool export feature class to geodatabase but nothing seems to work. I am fairly new to ModelBuilder, hopefully I've explained the problem well enough.
Any advise will be greatly appreciated. Thanks!