2

How do you output the number of records in a table in ModelBuilder? I can open the table and see how many records are there but I want to tabulate the number of records available from a number of tables.

3

You could use the Summary Statistics tool. The input table would be that which you want to count the records of. The statistics could be any field, but let's say ObjectID/OID. The statistic type would be COUNT. The output table could be whatever you like, possibly even stored in_memory.

Once the tool is run, the output table will have one record, and the value stored in the FREQUENCY field will the the number of records in the Input Table.

Have a look at the tool help for some more info, script examples etc.

  • thanks - when i previously tried this tool, i selected one my fields and got an error (red x) stating that "the value is not a member of SUM | MEAN | MIN | MAX..." Error 000800 The keyword used is not a member of the list of acceptable keywords. I don't know enough here to understand what the issue is. – val Feb 3 '16 at 23:22
  • 1
    That's a bit of an idiosyncrasy with the validation of the tool. The red 'X' shows up until you add the statistic type to the table on the right of the field name. See this image for a pointer. – Adam Feb 4 '16 at 1:59
  • WOW i feel dumb and grateful - that was it. ty. – val Feb 4 '16 at 2:28
  • Don't feel dumb! It's whoever wrote the validation for that tool that should feel dumb! – Adam Feb 4 '16 at 22:47
4

You can use the Get Count tool from the Data Management toolbox, which

Returns the total number of rows for a feature class, table, or layer

enter image description here

  • yes - but where is that information going? how do i point that into a table? I saw that model in the help. – val Feb 3 '16 at 23:23
  • I think you might mean a Model Builder parameter? – Stephen Lead Feb 3 '16 at 23:25
  • Thank you. Get Count outputs a row count - how does that get appended into a table. I have an iterator at the front end of my model which I use to calculate intersections from multiple feature classes against one common feature class. For each intersection I'm trying to state the number of records that intersected (one column) and the source table name (second column). – val Sep 26 '18 at 3:38

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.