Trouble Viewing Images? If the images appear too small or unclear, you can right-click on them and select "Open in New Tab." This will enlarge the image, allowing you to view it more easily. Alternatively, you can zoom in on the page by holding the "Ctrl" key and scrolling up with your mouse wheel.
Summary: This article provides the steps for Query Override. Attached is the View used in this article. It may prove useful to download and examine the parameter setup and follow along with the article.
How Query Override Works:
-
Dynamic (How the Value is Determined)
-
Dynamic = True: VDM fetches the value by running a SQL query.
-
Dynamic = False: The value is a static value set by the user.
-
-
Enabled (Turning the Feature On or Off)
-
-
Enabled = True: VDM checks whether Query Override is needed for a parameter and ignores all other properties outside the Query Override.
-
Enabled = False: VDM ignores Query Override and uses whatever value is input at run time.
-
-
-
Parameter Override (Defining Special Cases)
-
This is the parameter being evaluated to decide whether Query Override should apply.
-
VDM checks if the Parameter Override Value matches the given input for this parameter.
-
-
Parameter Override Value (When Override Applies)
-
If this value matches the override rule, VDM uses the Query Override.
-
If it doesn’t match, the user’s manual input is used instead.
-
-
Value (The Final Outcome)
-
If Query Override is applied, this predefined value is used in the query instead of the manually entered one.
-
Why Use Query Override?
Query override is a feature that allows VDM to dynamically replace a parameter’s value with a custom value or SQL result, without modifying the core query itself. This ensures that certain parameters like StartDate
and EndDate
are automatically populated based on predefined logic, rather than relying on direct user input.
Where Do You Set Query Override?
The Query Override properties are found under the Query Override section in the parameters.
Note: You need to add a parameter first before Query Override settings will appear.
Video Tutorial:
Video not yet available.
Steps to Use Query Override
1. Open VDM: Launch the VDM application on your workstation, then open your View.
2. Go to Parameters: Click on Parameters.
3. Add a Parameter for Query Override: This parameter will control whether Query Override is active.
TIP: Use "On" and "Off" as selectable values in a dropdown box for this parameter.
4. Select the Parameter to Set Up Query Override: Select your next parameter and scroll down to find the Query Override properties.
Note: In this example, we set the override properties up for the StartDate and EndDate parameters.
5. Enable Query Override: Set Enabled to True.
Optional: If you plan to use a SQL query to populate the Query Override Value, set Dynamic to True.
6. Select the parameter you created during Step 3 for the Parameter Override dropdown.
7. Set a Parameter Override Value (e.g., "Off" means manual input, "On" enables automatic Query Override).
8. Assign Predefined Values for Query Override: When Query Override is True (On), VDM will automatically replace manual entries with the value set here.
Example Setup:
Instead of asking the user to enter dates manually, VDM will use the following:
-
Start Date:
'2017-01-01'
(January 1, 2017) -
End Date:
'2017-12-31'
(December 31, 2017)
What This Means: If Query Override is ON, these dates are used automatically. If Query Override is OFF, users will need to enter dates manually.
9. Repeat for Additional Parameters: If needed, repeat the process for other parameters.
10. Test Query Override Setup: Run the View with Query Override ON and OFF to ensure everything works correctly.
✅ Example Result with Query Override ON: VDM automatically fills in the dates.
❌ Example Result with Query Override OFF: The user enters the dates manually.
Comments
0 comments
Article is closed for comments.