Select to view content in your preferred language

Model Builder - Export Get Count results for iterated fields as a table

681
1
Jump to solution
07-11-2023 02:03 AM
Labels (3)
DesislavaKsiazek
New Contributor II

Hi, I have used the Field Iterator, then the GetCount Tool to return the number of 0s in each field numeric field in a given table - and it has worked ok (got help from here about it :)) - it gave a row count result for every field in the geoprocessing results window. 

As far as I know from thread Allow the GET COUNT Tool to Output to a Table or T... - Esri Community, there is no tool to help display results GetCount results in a table yet.

From thread I would like to get a record count for many shapef... - Esri Community, I understand there is a way around it with the use of the Calculate Value and insert cursor, but I can't get my head around what the code would look like in the calculate value window. Would I be using the template below? 

This is coming from a complete beginner in Python. CaptureCode.PNGcalculate value.PNG

 

 

 

1 Solution

Accepted Solutions
DesislavaKsiazek
New Contributor II

I ended up using the collect value model builder tool immediately after the get count tool, the results of the getcount tool being input data for the collect values tool. This way I was able to save te results as table and continue with the rest of the model. 

View solution in original post

0 Kudos
1 Reply
DesislavaKsiazek
New Contributor II

I ended up using the collect value model builder tool immediately after the get count tool, the results of the getcount tool being input data for the collect values tool. This way I was able to save te results as table and continue with the rest of the model. 

0 Kudos