Showing count of content based on the select list values Drupal 7 - drupal

I have a requirement in which I need to show some content along with its count based on values in a select list. I wanted to display the allocated,released and resigned resources of a particular department in a selected date range. Using views, date range and department fields are created as exposed filters.
Created a content type for creating resources. The Resources content type is having action as a select list with values allocated,released,resigned. Department is another select list and date field is also added.
Please help me with an answer if views module is not enough. Provide some other solutions also. I'm using Drupal 7.

I figured out how to show node count in views. In my view I’ve some exposed filters and passed my select list cck field as contextual filter. If no result available I made the view to display summary as row count. In the template file, I’m planning to do some calculations for showing the resources count in and out of the project. Please correct me if there is anything wrong in this approach.

Related

how to limit view to just show each type one time?

I have a content type what is news, the news has a field type that is List (text) to keep different types of news. for example I have Health, Sport, Economic and etc.
So now I am going to create a block and have each of these type in that as a hyperlink.
I can do it and I created a new view block but each news_type may showing more than one time according to published content.
How to set the view (for block) to just show news_types and show them just one time?
You can achieve this by following the steps given below:
Enable aggregation under Advanced Accordion of the view
Add Nid field & set aggregation type as Count Distinct
Exclude Nid field from display
Add news type field & set Aggregation type as Group results together, in Group Column select Value option from dropdown
Remove Publishing Date from sort criteria
Please check attached screenshot for reference
You can check this question for more information, and maybe help you.

Drupal 7: Search fields

I've just started to learn Drupal and decided to implement a simple "Student list" site.
In my content type "Student" I have added a numerical field "age". And now, after entering some content and reindexing I want to perform search on the "age" field.
If I enter some valid age into search box, then nothing is found.
How do I find students by age or by age range?
If you're new to Drupal, each of these steps will require its own instruction. Luckily, there are plenty of tutorials on the interweb.
To create a sortable/filterable list page from your student content type:
Create a view from the student content type.
Set the new view's display type to Table View and ensure that the the age colum is listed as a field you want to display.
Set the table's headers to clickable (so that you can sort your list when it's displayed.)
Use exposed filters to allow people to filter your group by an age, age range, or other criteria (e.g. last name, etc.).
I'd consider the following searches for each step:
Drupal 7 Create View site:youtube.com
Drupal 7 Table View Display Format
Clickable Table View Headers in Drupal 7
Drupal 7 Exposed Filter site:youtube.com

Add view filter to retrieve content associated with one or more Taxonomy Term IDs

I have created a Drupal 6 view which has two "Taxonomy: Term" (Term ID) filters, for two different taxonomy terms. I need to create a feed that pulls content that is associated with a OR b, or that is associated with a AND b. Currently, nothing is displayed because it seems that the logic of two filters is AND, not OR.
How do you pull content that has the logic OR with Drupal views?
It does work if there is only one filter, but as soon as I add a second filter, zero records are found.
The OR filter is not built in to Views2. For ways to get around this, see http://groups.drupal.org/node/16173. And this old post might help as well OR operator in Drupal View Filters

Views 1: Filter by custom table/field (or using Argument Hand. Code)

I have a page which should list nodes. The views is called from a locality page (a taxonomy term page). What I need is almost the same as using the Taxonomy: tid in arguments and passing the tid.
I can't use the term_node table, as (for other reasons) we have a custom table term_node_hierarchy (with nid and tid only). The table term_node_hierarchy is like term_node but also saves the tid of the parents (from an "external" code)
I've been looking for options but still no joy.
Currently I'm building an array of the nid's that should be displayed on the current page, and passing them like print views_build_view('embed', $view, $matching_nids); but the Argument Node: ID states This argument is a single Node ID. As said, only the first node is displayed when printing the views. It would be great if it could filter on more than one nid.
I'm open to any kind of suggestions on how to do this.
Thanks
You could create your own module for this. You could populate the $page_content variable with the results of your own custom query where you allow the user to sort against multiple nids. You could do this a number of different ways. You could display a list of the existing nids with corresponding checkboxes, so that, when the user clicks submit, all the nids that match the selected checkboxes get used in the query. Then you just display the result of that query. That's the easiest way I can think of to offer that degree of flexibility.

Select date fields for only 6 months beginning with current in Drupal Views

I have a content type with a date field which can have multiple values.
How can i select the dates in Views for each month separately, beginning with the current month and have table columns titled with the month names?
Views can filter the appropriate nodes easily enough using "filters" and "sort criteria" in the views UI.
But, you probably won't be able to get a table-based view of the nodes in table form without developing a custom module or theme function to render the table HTML. There's really no easy way (that I know of) to turn a specialized query into an HTML table without digging into PHP and iterating through query results.
More info on developing modules is at http://drupal.org/node/508
And is it posible to do it by selecting the date field six times and passing six arguments?

Resources