The New Query button is the most popular extended option suported by EazyQuery and we've descirbed it's use in detail below. This option allows the user to open a second query that is filtered by the data in the selected row in the first query. Say for example you have a query showing a list of Purchase Order Headers. You can define a new query button to show the details of the selected Purchase Order. This process makes it a lot easier for users to move between related sets of data and saves them having to specify filter options multiple times.


On the buttons form, ensure New Query is selected - this is the default selection.


New Query options


The form simply needs to be filled in from top to bottom and the lookups help to ensure you make the right selections at each point in th process. To begin, select the Query Name that you want to use as your starting point from the dropdown.


Selecting the Initial Query


In our example we are selecting the query ‘vw_EQ_Receiving_POHeader’. Next we have to select the query we want to open once the user has clicked on a PO Header. We want to view the PO Details so we select the Target Query of vw_EQ_Receiving_PODetail as shown below.


Selecting the Target Query


Button text is the text you want the user to see – in this case ‘SYSPRO PO Details’ and click on ‘Add Button’


Defining the button text


This adds the data to the RHS of the screen. You have now told EazyQuery that you want the user to see a button called SYSPRO PO Details on the Syspro PO Header form and that you want the open the PO Details view. What we haven't done yet is told EazyQeury how to know which PO Details to show. This is done by defining the parameters.


In our example, the link between the header and the lines is the PurchaseOrder number. This column has to exist in both views. Select the Source Column from the dropdown list. ‘PurchaseOrder’ 

Defining the Source Column Parameter

Now select the Target Column which is also called ‘PurchaseOrder’ and click on Add Parameter

Adding the Target Column Parameter


This adds the button with the parameter. In our example we have made the two views have the same column name in each view. While this is not an explicit requirement, it does make it a lot easier to use when doing the configuration and is strongly recommended. You will see the end result below.


New Query Button fully configured


To test the button, select ‘New Query’ and select your query.

Selecting a new query




Open the form to see something like the one below


List of Purchase Orders


Note the SYSPRO PO Details button. Click this button and a new tab opens with the PO Details for the selected PO.


Details of selected PO