View settings - 1.4-BETA1

The Views Dynamic Fields module provides a filter for use with Views module. This filter allows the user to pick and choose which fields to display for a rendered instance of a view for that user. This provides a customized view instance for each user.

This module provides additional advantages when used with the Views Bonus Pack module or the Views Excel Export module to generate an xls file from a view. The xls file will only display the fields you have chosen on the rendered view instance in browser.

Features

* Users can dynamically choose the fields to view in their rendered view instance
* Users can sort and re-order the fields in the view (1.4-BETA1 onwards)
* Default fields to show when no filtering is applied, can be configured (1.4-BETA1 onwards)
* Possible to always keep certain fields to display to the user (sticky fields)
* An exclusion mode to allow reverse selection of fields when there are too many
* Great for creating and exporting reports from the view (needs views_export_xls or similar module)

Sample Usage scenario

Assume we have the following requirements:
We as an administrator of a large corporation have to create a report 'sales_analysis' for the company executives to access periodically to view how well their products are being adopted in the market. This report will be accessed by various departments - sales, marketing, engineering and others. The report additionally needs to have the ability to be exported as an XLS.

We then decide to create this generic report having a lot of fields to satisfy the eyes of all departments. So this view ends up containing too many fields (which for example's sake are limited to):
* Product
* Technical Specs
* Product Engineer
* Country
* Marketing Campaign
* Gross sales

(For the XLS export feature, we decide to use the already available Views bonus pack module, which allows the view to be downloadable as an XLS file. For this, we need to create a 'feed' using 'XLS Feed' style and attach it to either the default or page display - please see the module for more information on how to configure that).

Now when a sales executive looks at this report, he/she is not interested in the Tech Specs and/or the Product Engineer. But at the moment there is no way to dynamically exclude those fields just for that instance of that view for that user. Unfortunately, these unwanted details get carried over into the XLS file he/she generates for the Sales team, which would be used in their weekly board meetings. The Engineering team on the other hand do not care about the Marketing campaign used or even the gross sales, when they look at this view.

The only alternative for the poor developer would be to create multiple views with different fields to cater to each departments' requirements - one each for Sales team, Product team, Marketing etc. That would be a waste of effort and provides too much redundancy and changes to the core view query would have to be effected to each of the different views.

It would have been so much simpler if we had one generic view and then presented the user with a list of fields of that view along with checkboxes for the user to pick and choose which fields they wanted to see (and also export to the XLS) for that instance.

The proposed module 'views_dynamic_fields' creates a filter that allows for dynamic selection of fields. These will also hold true for the XLS download when configured with the views_export_xls module. Hence a user can choose the fields they want to download into their XLS module.

Other features of this module include the ability to either 'select' or 'deselect' fields (exclusion mode). If a view has a large number of fields and we need to remove just 1 or 2 from the display, then the selected fields can be chosen to be 'excluded', rather than 'included' by default. Screenshots attached. Unfortunately I do not have a website where I can demonstrate this. I would like to take this forward seeing the community adoption and features requested by others as well.

Module dependencies

This module depends on the Views (http://drupal.org/project/views) module.

Installation

1. Place the entirety of this directory in sites/all/modules/views_dynamic_fields
2. Navigate to administer >> build >> modules. Enable views_dynamic_fields.

Usage

See the README.txt file in the module for instructions.

Project Information

Downloads