Hemi UI / Hemi 3 0 UI - Functional Scope and Wireframes / Еxports / Create New Automatic Export / Create Automatic Export Step 3 QUERY

Create Automatic Export Step 3 QUERY

In the Query section depends on the user account we will see only Query Builder (for non administrators) or both Query Builder and Code Query. Instead of the field names we need to display the field labels with the table label in front.

Query Builder

We will have 3 scrolls - one for the query fields, one for the selected fields and one for the section. In the Query Fields we should be able to search for fields using elastic logic and if we type “ID” we want to see all fields containing “ID”. The search should work on both the table and field label.

By drag and drop the user should be able to select/move the desired fields which he want to include in the select and also we want to have an option to delete the already selected fields or reorder them and set field alias which will be the actual header in the export file.

Under the query fields we want to have the Conditions which represents the Where section and all field from the query fields should be available for filtering but we need to implement some validations based on the field type. For example if the user select to filter a dropdown field the value should be a dropdown list with enumerations. If we select a data field we should display a date picker etc. (Regarding the comparisons we can use what we have for the advance search.)

The user should be able to add more than one condition and specify different operators “AND” and “OR” and also remove already added conditions. Also we should give them the option to group the conditions using brackets “(” and “)”

After the conditions we will the the Group By which should allow the user to choose from all selected fields and add multiple fields for grouping and once a field is selected for grouping we should remove it from the field list. Also the user should be able to remove any set grouping.

Same is the case with the Sort By which simply represent “Order By” and we should allow the user to choose from all selected fields and add multiple fields for sorting and once a field is selected for sorting we should remove it from the field list. At the end the user should be able to select the way of sorting either “ASC” or “DESC”. Also the user should be able to remove any set sorting.

The final option we would like to give is a Limit which will set a limit of the records returned in the query here the value should accept only whole numbers.

At the end of the Query Builder we would like to introduce a link which will redirect to “https://hemi.atlassian.net/servicedesk/customer/portal/6/group/26/create/96

Here are some more sample WF of the different cases in the Query Builder.

WF with added second condition and selected fields:

WF with sample of the dropdown fields

Field Name Field Type Field Values Required
1 Conditions Dropdown 1.AND
2.OR No
2 Comparisons Dropdown 1. =
  1. <
  2. <=
  3. =

  4. !=
  5. Contains
  6. Starts With
  7. Ends With
  8. Does Not Contain
  9. Does Not Start With
  10. Does Not Ends With
  11. In List
  12. Not In List
  13. Is Empty
  14. Is Not Empty | No | | 3 | Sort By | Dropdown | 1.ASC 2.DESC | No |

WF with completed query:

Code Query

This option should be available only for administrator user which have explicit access to this section. It is important to notice that this can be a breach to the system and we want to be very careful with it!

Is this article helpful?
0 0 0