VQL View
Last updated
Last updated
In the VQL View, you can execute single VQL queries.
To execute a VQL query, do one of the following:
Press F9 or Shift+Enter.
Go to the Edit menu>Run.
Click Run on the context menu.
Click the Run button on the toolbar.
Other actions you can perform in the VQL View:
Double-click a cell in the result grid to copy the value on the clipboard. Press Ctrl when double-clicking to insert the cell value into the code editor at the current cursor position. The latter can also be performed on the result grid's column headers to insert the respective column names as attribute names at the cursor position.
Click and hold the left mouse button for 1 second on any value representing a valid Veeva id
to load the respective object into the Object Navigator (see Object Navigator).
Double-click the messages in the status bar to copy them to the clipboard. Move the mouse cursor over the status bar to display the current message in a tooltip, if it does not fit into the message bar area.
You can see information about the latest executed action and the query result in the Messages area.
The status bar displays the complete execution time of the query, including the transfer of the query results to dqMan. The pure server response time without data transfer is labeled as Server response time.
You can enter one or several VQL queries in the SQL Query input area. When executing the query, all the content in the input area is regarded as one query and transferred to the Veeva Vault for execution. However, if only a part of a query is selected, then only this part is executed.
Use semicolons as separators for two or more queries. Setting the text cursor on one query selects this query for execution.
Moreover, you can add comments. Every line beginning with --, # or // characters is regarded as a comment line.
A number of syntax assistance functions supports the creation of VQL queries:
Command syntax: Click a VQL command and wait for the hint to view the correct command syntax.
Auto completion: Several dynamic values, such as object names, query targets, VQL functions and so on, or allowed function values are faded in automatically in the form of a selection list. You can copy the values from selection lists by pressing Enter.
You can manually activate the selection list anywhere in the command area by pressing Ctrl+Space. The list is filled context dependent with the likely values at the current position. If none of the pre-defined lists applies, the list is filled with the possible attribute names.
The Results list contains the data returned by the previously executed VQL statement.
Use your mouse to resize the columns and rows and reposition the columns in the Results list.
To search through the entire table, go to Edit menu>Search. Typing one or several initial letters within one column will scroll to the first matching value.
You can right-click the desired Results list column head and select to sort it alphabetically. Clicking an item to scroll the column into the visible range of the list.
On the data area, a list of functions is faded in for object processing. Available functions are:
Edit Starts the Results List Inline Editor.
Copy This function copies the selected values to the clipboard. Rows will be separated with a linefeed and a carriage return character; columns will be separated with tabs.
Copy with Header This function copies the selected values to the clipboard, including the header names of the selected columns in the first line. Rows will be separated with a linefeed and a carriage return character; columns will be separated with tabs.
Duplicate Duplicate copies all selected values in a separate data grid.
Add to compare list The selected objects are added to the Object Compare list.
Sort Sorts the result data ascending or descending by the selected column.
Goto... Enables the fast change to a line or a column for the Results list. Entering a number enables vertical scroll, entering a column header or selecting one from the will enables horizontal scroll.
Marks Used to select different objects in the Results list. You can toggle or scroll marks to the next or previous marked object. Marks are mainly used by the Compare Data function, but can also be set manually.
Export to Exports the selected cells of the Results list to CSV or Microsoft Excel (you need to have Excel installed to be able to export to this format). You cannot export data to Excel if a remote Office 365 installation is used; if this is the case, use the Copy with Header command.
Dump Dump the select document or object. Available only when id field is displayed in the grid.
View file content Opens the content of the selected document. Available only when id field is displayed in the grid.
View Renditions Opens the last version of rendition of the selected document. Available only when id field is displayed in the grid.
View Attachments Opens a list of attachments where you can choose from. Available only when id field is displayed in the grid.
Delete Selected Version Deletes the selected version of the document. This option is present only when all fields required for identifying a version are displayed in the grid: id, major_version_number__v, minor_version_number__v,
Delete All Versions Deletes all versions of a document.
Open in Veeva Opens the Veeva UI in the browser and navigates to the selected object
You can edit values directly in the Results list, if the results contain the id
attribute.
Press Enter to save any changes.
Pressing Esc or moving the focus to any other control will close the editor without saving.
Single Attributes For single attributes, a standard input field will be created in the corresponding cell of the grid. Some attributes display a list with possible values.
Repeating Attributes You can modify Repeating Attributes within a small sub grid. The sub grid offers an own context menu for inserting, deleting or reordering values of the repeating attribute.
Multiple Single Attributes If the Results list contains more than one result, you can edit a single attribute of multiple objects simultaneously. Select more than one value in a column and start the editor. The values you enter are applied to all the selected objects.
Multiple standalone or linked repeating attributes You can also modify standalone or linked repeating attributes of more than one object at the same time, if the selection is extended to more than one object (line) in the result grid. The values you enter are applied to all the selected objects.
You can filter query results by the queried values using the attribute filter, which can be open for each column. You can combine filters and use them for multiple columns using an “and” operation.
To open an attribute filter for a column, click the button in the column header and then, in the filter dialog box, you can see the filter options depending on the column data type.
Click Apply Filter to activate the filter after selecting the filter options. If a filter is active, the filter button in the column header and the row numbers are highlighted.
Additionally, all filter buttons in column headers have a context menu.
The Message Area logs the executed VQL commands and their results. The context menu offers some settings to influence the behavior:
You can activate the Message Area from the View menu.
You can format VQL queries automatically. The associated format templates are defined in the file FormatTemplates.xml.
To format a query, click on the query in the VQL input area and select the function Auto Format Query from the context menu of the VQL input area.
The Query:
Select id, name__v, binder__v, created_by__v from documents
where binder__v = true order by id;
Will be formatted to:
SELECT
id,
binder__v,
created_by__v
FROM
documents
WHERE
binder__v = true
ORDER BY
id
To clear the formatting of a query (unformat), use the Unformat Query function from the context menu. Calling this function removes all tabs, multiple spaces, line feeds and carriage returns from the query, leaving a plain single line query.
To stop a running query, click the Stop button on the toolbar.
Proprietary syntax: Statements using dqMan proprietary syntax elements show a dqMan marker to the left
Function | What It Does |
---|---|
Function | What It Does |
---|---|
Modify Filter
Opens the filter dialog box.
Clear Filter
Clears the selected filter and updates the list.
Filtered Columns
Displays the list of all active filters in the list. Select a column to scroll the list down to the corresponding column.
Show marked objects only
Limits the filter to the marked objects, for example after using Compare Data function.
Clear all OTHER Filter
Clears all other filters except for the selected one.
Clear ALL Filter
Clears all filters.
Copy
Copies selected text to clipboard
Clear
Clears message Area
Settings / Auto Clear Log
Clears the Message Area before executing a query (this setting is ignored for auto repeated query).
Settings / Log Query Results
Besides messages, VQL results will also be logged in the Message area.
Settings / CSV Format for Query Results
Results of VQL queries will be logged in CSV format.
Settings / Fixed Width for Query Results
Results of VQL queries will be logged as list with fixed width. Values can be truncated if too long.
Word Wrap
Toggles word wrap on/off