Select to view content in your preferred language

"If Row Count Is" missundertanding - ModelBuilder

964
6
12-21-2021 07:16 PM
RicardoSanabria1
Emerging Contributor

Hi everyone,

I'm trying to select from a dataset from a feature class. Then I would like to know if there are any records to make a buffer. I'm trying to do that using "If Row Count Is" tool, but I think I'm not understanding because the next tools has became in gray.

 

RicardoSanabria1_0-1640142895115.png

 

Any help?

Thanks a lot.  

0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor
0 Kudos
RicardoSanabria1
Emerging Contributor

Hi Dan,

Thank you for your interest. Yes, I need to know if the feature class called "s_2calzada" has any records because the previous select tool might get zero records. If there are records it must continue with the buffer tool.

Best regards,

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

How do the parameters look in "If Row Count is" tool?

What tool is "Select Doble Calzada"? How do the parameters look in that tool?

Also check if If Data Exists (ModelBuilder)—ArcGIS Pro works for you.



Think Location
0 Kudos
RicardoSanabria1
Emerging Contributor

Hi Jayanta,

It's a Select tool "Select Doble Calzada" and its parameters are:

RicardoSanabria1_0-1640186986411.png

On the other hand, I tried the "If Data Exists" tool, but the problem is the select tool creates a feature class with zero records, and the "If Data Exists" tool evaluates if there is a feature class but not if it has any records.

 

Best regards,

0 Kudos
DanPatterson
MVP Esteemed Contributor

you have to get the row count then the branching tool checks the result


... sort of retired...
0 Kudos
RicardoSanabria1
Emerging Contributor

It doesn't work either 😕  The get count tool derives an integer, in this case is zero, but the "If Row Count Is" tool is expecting a "table view", it takes the row count value as a condition.RicardoSanabria1_1-1640225309313.png

RicardoSanabria1_0-1640225074067.png

Will there be another easier way to do this?

0 Kudos