Introduction
Tango Visual Query has been enhanced to optimize the user experience and make customization and sharing of queries easier. Upon launching Visual Query, you will now have easy access to executing saved queries and the creation of a new query is only a single click away. As usual, access to previously saved and shared queries will be available without disruption.
Visual Query helps you construct complex database queries without having to know SQL statements. A rich set of visual options are available to let you combine data across tabs, include/exclude data, or control sort order. Based on your selections, Visual Query will generate a complete SQL statement that can be executed to display the required results with ease.
Steps
Step 1: Login using the user credentials. Upon successful login, the User will see the Tango functional dashboard.
Step 2: Upon selecting the ‘Visual Query’ icon, the screen refreshes and loads a new query builder page. The page displays three different tabs controlled by the enterprise roles, and these roles will remain similar if you had owned the previous version of the visual query. The saves queries will be displayed within the tabs, but if you hadn't saved any query yet, then select the '+' icon to create a new query.
Step 3: Upon, selecting the '+' icon to create a new query, the screen refreshes and displays the 'Select Entity' field. Click on the ‘Select Entity’ drop-down menu to make a selection of the required entity (Site, Target, Store, Lease, Projects, Assets, Locations).
Step 4: Upon selecting the entity type, the screen refreshes. The 'Query Builder' page is displayed to make the required selection to build the query even without any prior SQL knowledge. This feature allows the user to select the data points specific to the chosen entity and apply necessary filters. Also, you can select the '+' icon to join multiple entities.
Example: If you would prefer to pull the Store Number, Store Address, or the Address, from the list of values displayed, then you would select the fields/data points in this segment. Just click on the checkbox to make a selection.
Use the Toggle view icon to flip between the table view and the grid view for the visual difference in the display of fields, and use the 'Select All' slidebar to select all the fields at once without the need to select each of the checkboxes.
Step 5: Once the selections are complete, select the 'Add Rule' command button to apply further filter conditions.
Example: If you want to filter records based on country, select the country from the list of fields and key in the country code in the text box, as shown in the screenshot below.
-
The AND & OR Conditions :
- AND - Select the 'AND' operator to execute one or more conditions where the records displayed satisfies all the conditions.
- OR - Select the 'OR' operator to execute one or more conditions where the records displayed satisfies any one of the conditions, and not necessarily all the conditions need to be TRUE.
Example: 'OR' condition can be used as shown below to select the stores in the USA and Canada. This will display records that have stores located either in the USA or Canada. Whereas, 'AND' condition displays only the store records present in both the USA and Canada.
The 'Invert' command allows the user to toggle between the 'AND' & 'OR' condition.
Step 6: Select the operator to add the condition to the query statement by selecting the operator value from the drop-down selection placed between the column name and the value textbox. This displays the different conditions that can be used to extract the results from the query.
- equal - When you want to result to have one specific value. (Eg: country equal USA will return results whose country is the only USA and not other countries).
- not equal - When the result should not be the value mentioned in the text box.
- in - similar to equal but can be used to have multiple values in the text box, where you can enter the multiple values separated by a comma (Eg: State 'in' MN, TX, FL will return values that belongs to the states MN, TX, and FL)
- not in - The results displayed will have the values entered in the text box.
- Contains - Will display the results that have the values entered in the text box (Eg: when you enter city contains 't' , then the result will return all the cities with the value 'ata' in it, like 'Wayzata, 'St.Paul', 'Brooklyn Center' etc).
- doesn't contain - The result displayed will not have the value entered in the text box.
- end with - The result displayed will end with the value entered in the text box (Eg: when you enter city end with 'ta' , then the result will return all the cities with the value 'ata' in it, like 'Wayzata').
- doesn't end with - This is different from 'doesn't contain', whereas the doesn't contain will not have the value entered in the text box but the 'doesn't end with' will have values anything but the text entered in the textbox.
- is empty - Will return results that have no values entered in it.
- is not empty - Returns results whose field value is not empty and has some information in it.
- is null - These are values that are specifically mentioned as 'NULL' values in the database.
- is not null - Returns all the field values that are not NULL.
Step 7: Multiple conditions can be added by selecting the 'Add Rule' and these conditions can be grouped using the 'Add Group'.
-
Add Group - Used to created nested filter conditions. The conditions can be grouped with both AND/OR.
Example: The below shows how to select all the stores for the state of MN which does not have the city that ends with 'ta' in the USA. This will display all the cities from MN except those that end with ta like 'Wayzata'.
- Display Query - Select the 'Display Query' command button to display the SQL query that will be executed.
Step 8: Once the data points and filter conditions are applied, click the 'Submit' command button to view the results.
- Edit - allows you to edit/change the data points/ query conditions and apply the new query.
- Clear - Clears the query created.
- Cancel - Closes the query tab and cancels the query.
- Excel - Exports the results in .xlsx format and saves them to the local device.
- Table - View the results in a table format on the map.
- View on map - Displays the icons on the map.
- Style - Allows the user to customize the color and shape of the icons on the map and make changes to the shape, fill, and line properties. Once the changes are made, select the 'Apply Style' to save the changes and display them on the map.
Saving the Query
Step 1: Click on the 'Save' command button to save the query.
Step 2: Enter the 'Query Name' and 'Description' to search for the query in the future and for easier identification of the saved query.
Step 3: To view the saved query click on the user tab to retrieve/view the saved query.
- Delete the saved Query.
- Make the Query Public so all users can view the query.
- Execute the query parameters. This allows you to view and make changes to the query operator and field conditions.
- Execute the query to directly view the results.
- Allows you to edit the entire query and also make changes to the columns selected/displayed or join entities.
- Share the query only with selected users instead of making it publicly available to everyone/all the users.
Sharing The Query
The share icon allows the user to share the query with the other users of the application.
Step 1: Click on the Share Icon as shown above in step 3 of the save query. A list of users will be displayed. Select the checkbox of the users you would like to share the query with.
Step 2: Enable the edit access if you would like to provide the user with the ability to make changes to the saved query.
Step 3: Once the users are selected and edit access provided if required, review once before submitting the request. If you would like to remove the user, select the delete icon to remove the user from the list. Select the 'Submit' command button to share the query. This query will be now visible in the shared tab.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article