2

I am having a slight problem with using the Make Feature Layer tool in ModelBuilder.

Basically I have a file geodatabase of points. I am trying to make a model to pull out points according to a reference field value. I could just make the expression for the tool a variable but unfortunately the users who are going to use it are to dense to create a simple SQL statement.

I have created a model String variable (VRefNo) to take the reference number (Its alphanumeric hence the string. The column in the geodatabase is also a string) and tried to parse it in the usual way to the expression:

"RefNo" = '%VRefNo%' 

and all the other variables are hard coded. I have made the variable a model parameter and checked the add to display check box for the output and made sure nothing is intermediate (There is only one tool in the model and thats it).

The model runs ok with no errors but I am not getting an output.

Any Ideas?


I can get the select tool to work in ModelBuilder when run from the toolbox only when I make the output a model parametre. That's all nice but I only want to save the results temporarily to memory (in_memory) and would prefer the user not having the option to change this.

I would make a python script to do it but all the clients dont have python installed on their machines.

  • if they have ArcGIS installed, they should have Python installed. It's installed as part of the defualt configuration. – RyanDalton Sep 14 '12 at 17:21
2

Use the "like" operator instead of "=". Your double wildcard should then work.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • 1
    Its not a double wild card. As far as I am aware according to ESRI help you use double % to enclose a variable and as it is a string it has single quotes on either end. VRefNo is a model variable and parametre that the user enters when the model runs from a tool box that I am trying to use in the expression. – Chris C Sep 13 '12 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.