===== User dynamic parameters ===== ===== Dashboard block ===== Filters only work on real values that already exist in the records. Opositely, user parameters can: * Offer parametrisation based on an arbitrary set of attribute values * Provide list selectors based on arbitrary value sets * Provide partial filters (type search by pattern) * Provide date or value range filters {{ :blocks:dashboard:userparams_en.jpg |}} Up to 5 user parameters can be defined that will add dynamic behaviour to the query. These parameters will add dynamic "WHERE" constraints using those variables, and will turn the dashboard into a dynamic query tool for the end user. ==== Defining a user parameter ==== === SQL field === The (real, unaliased) table SQL field name on wich the constraint will be added. === Label === The visible label this query control will appear with on the dashboard interface. === Type === The constraint type: * **single Choice**: a small amount of options presented using radio buttons. * **Text**: A text field which value will always be processed in a "LIKE" statement. Search patterns are thus possible, such are "Smi%" to search for names starting with 'Smi'. * **Value list**: Shown as a select, and thus quite similar to a filter, but the value set is independant from query results and can be arbitrary. * **Value range**: shows two textfields in which a min and a max value can be input. The constraint relies on a ">=" and "<=" operator in the query. * **Date**: a date selector. * **Date range**: will show two date selectors for the min date and the max date === Values === For the types 'single choice' and 'list', provides the option values. ==== Inserting the parameter rules in the query ==== If user params are used, the placeholder <%%PARAMS%%> will have to be inseted in the query body. This placeholder must be part of a WHERE clause. (or eventually if consistant a ON portion of a partial JOIN statement). ----- ====Credits==== * Valéry Frémaux (valery@activeprolearn.com)- Main design and development * Florence Labord (florence@activeprolearn.com) - Docmentation and tests [[:blocks:dashboard:userguide|Return to the configuraiton guide index]] - [[:Blocks:Dashboard|Return to the component index]] - [[:Blocks:Dashboard:QueryCatalogue|Generic query catalog]] - [[:Plugins|Return to the plugins index]] - [[:start|Home]]