Variable Filters
Trouble seeing the images? Right click on images and open in new tab to enlarge or zoom in on the page (Ctrl + mousewheel).
Variable Filters are linked to a Parameter, that when used can modify a filter statement. This can be useful when the user wants to use either two completely separate filter statements, or a modified filter statement based off of parameter input.
Below is a step by step guide to create and use a Variable filter with a parameter. The Parameter is inside the following Advanced Filter Statement:
SQLUser_UU_COLLECTION_SUPERVISOR.Debtor_Pay_Rate IS NOT NULL AND SQLUser_Payment_History.OCCURENCE_DATE >= '2016-09-01' AND SQLUser_Payment_History.OCCURENCE_DATE <= '2016-09-30' ?VariableTest?
Steps To Use Variable Filters
- n this example, we added a new Parameter and Named it "VariableTest". This parameter will use a variable filter to add an additional filter statement to the statement above.
- Set the Datatype to None (default)
- Set the Default Value to "N"
- Set the Description to: Select (Y) to use the additional Filter Statement
- Set the type to a "Combobox"
- Inside of the values list add the items "Y" and "N". This step is important as these are going to be the names of the variable filters.
- Set the Variable Filter equal to True
- Add two Variable Filters to the view by clicking the "+" in the Variable Filters section.
- Rename one of the Variable filters to "Y" and the other to "N". This is what links these two variable filters to the Parameter that will be driving which Variable Filter to use (the values list in the parameter contains the names of the corresponding Variable Filters).
- Inside of the "Y" Variable Filter add the additional Filter statement to be added. In this example, we used: "AND SQLUser_User_Master.Group_Suprs_ID = 100"
- Leave the statement for the "N" Variable filter empty.
- When searching the view, if the VariableTest parameter value selected is "Y", the entire filter statement will be: "SQLUser_UU_COLLECTION_SUPERVISOR.Debtor_Pay_Rate IS NOT NULL AND SQLUser_Payment_History.OCCURENCE_DATE >= '2016-09-01' AND SQLUser_Payment_History.OCCURENCE_DATE <= '2016-09-30' AND SQLUser_User_Master.Group_Suprs_ID = 100"
- When searching the view, if the VariableTest Parameter value selected is "N", no additional statement is added (because we left the statement empty), and the filter statement would be: "SQLUser_UU_COLLECTION_SUPERVISOR.Debtor_Pay_Rate IS NOT NULL AND SQLUser_Payment_History.OCCURENCE_DATE >= '2016-09-01' AND SQLUser_Payment_History.OCCURENCE_DATE <= '2016-09-30'"
Comments
0 comments
Please sign in to leave a comment.