How to select a raster from raster catalog by a selected point with a field that contains the raster name

3442
4
05-31-2016 02:40 AM
RolandGliba
New Contributor III

Hy!

I have a managed raster catalog and its raster's names are contained in a field in a point feature class. I use the select layer by location tool with an in memory point to get the point and then I need something to get this value to the select layer by attribute tool. Can anyone help me? thank you

Roland

0 Kudos
4 Replies
FC_Basson
MVP Regular Contributor

You can set the Expression value in the Select Layer By Attribute tool by using the field value of the previous process with an inline variable:

MYFIELD = '%Value%'

Also make the Get Field Value result a precondition for your final select by attribute process.

0 Kudos
RolandGliba
New Contributor III

I did it, get field value is made as a precondition to the select layer by attributes, the model is running without any result so the problem is, either with the get field value process or with the expression.

0 Kudos
FC_Basson
MVP Regular Contributor

This is where you need to break your model down in parts and see what each process required inputs and results are.

0 Kudos
curtvprice
MVP Esteemed Contributor

You aren't seeing any thing in the message dialog that gives you a clue?

One approach you may want to try is to use the Calculate Value tool to compose your SQL expression from the output of Get Field Value. Value would be a precondition to Calculate Value, which would use the expression:  r"MYFIELD = '%Value%'" with the datatype set to SQL expression. The SQL expression would then connect into your Select Layer By Attribute tool.

0 Kudos