2

Not sure if this is possible, but I want to be able to show the total count of column without the line items present. The way I was thinking to approach is to create a calculated column then show only that column in a web part. But, the items still appear and there is no way to create a calculated column that does so. Next, I was thinking to use the ID column and use item count. Again, the items in the list still appear.

Is there a way to ONLY show the total without items in the list?

Example

enter image description here

SharePoint Lady
  • 1,443
  • 1
  • 35
  • 61
  • What are you trying to total up? Is it whether or not each list item's column has a value in it or not? – Erik Perez Jan 04 '16 at 19:22
  • @Erik Thanks for your comment. Yes, I am trying to total up whether the column has a value or a single line of text. – SharePoint Lady Jan 04 '16 at 20:12
  • A Calculated Formula can hide its own row: http://sharepoint.stackexchange.com/questions/154100/javascript-event-when-a-row-is-updated-changed-in-a-datasheet-view/154105#154105 – Danny '365CSI' Engelman Jan 04 '16 at 20:39

2 Answers2

3

Assuming you want to have a count of whether or not a list item's text column has a value, you can use the Totals properties of a view. Select the text field and then choose "Count" for the each field you require. Then, eliminate all fields from this view definition except those fields you are counting. And finally, you'll need to apply CSS (to the view page only) to hide the items that appear. One possibility is the following but you'll have to test if there are adverse effects:

<style>.ms-itmhover {display:none;}</style>

Your view page will look like this:

enter image description here

Erik Perez
  • 1,685
  • 9
  • 12
  • This does it for a library, but be aware that users can reverse the display:none from the browser's developer tools which would reveal the items of the library. So if the content has to be secret, this isn't recommended. – moe Jan 05 '16 at 10:04
  • Moreover: adding also "ms-viewheadertr ms-vhltr" you also trim away the column names "Name" and SingleText". Code updated: .ms-itmhover, .ms-viewheadertr.ms-vhltr {display:none;} – Marpio Feb 16 '17 at 09:26
1

You can use code to hide it.

Or you can create a new column to restore the count using SharePoint Designer workflow.

A demo may be helpful to you: How can I set up a workflow to count the number of items in a list?

Max
  • 31
  • 2