Standard Feature – View Query Link
Overview
Query Links are a powerful feature in Govern for OpenForms. This feature allows the addition of a link in a custom control that will open another form or report. In addition, with this feature users are able to set and pass a Govern ID before opening a report or OpenForm. There are a few ways that this feature is implemented in the Govern for OpenForms application.
View Query Link
Why a View Query Link
The main purpose if this implementation is to have an account set up with a principal record, and all satellite offices associated with that record were to then be presented in a grid. When this ACCOUNT that is based on a name ID, is retrieved, if the current ID is set to NA_ID1, then a click on a link could be made to open the name and address of its satellite offices, NA_ID2, NA_ID3, and so on. Previously this link could be performed to another OpenForm, but it was not possible to change the active Name ID (NA_ID) on the linked form. One previous workaround was to take the ID of the current form, go to the configuration of the form and set the NA_ID as an ID setter, as this was not always desirable, often a button was used to control whether the ID would be set. With the View Query Link feature, a more streamlined solution is obtained. When this feature is configured, there are multiple methods of implementing it.
NOTE: The end results are similar, but the methods of implementation differ. |
BUSINESS RULES:
|
View Query Link – Type 1
What are referred to as Type 1 View Query Links are the basic implementation of the View Query Link feature. The link is presented as a hyperlink or a button that will initiate the link. To demonstrate this feature, we will add a link to the Coordinate parameters on the parcel information OpenForms.
Configuration
When a link is placed in the Coordinates group. This link will be set with different properties. As is allowed in the OpenForms Designer (OFD), the link can be initiated as a Hyperlink, or an Action Button.
View Query Link – Type 2
A second implementation is used within the Self Reported Tax Estimate form. A link is created within a View Query. When this link is selected, it will launch the SRT Form on the Tax Filing entity for the specified period.
Configuration
Using the ST Estimate feature as an example, a link to the ST account entity will need to be created. The required configurations are made in the Govern New Administration (GNA) and the OpenForms Designer (OFD). In addition a standard view query will need to be modified through the GNA.
View Query Link – Type 3
The third implementation the View Query Link yields the same link results as the Type 1 and Type 2 implementation, i.e. for SRT, it will launch the Form on the Tax Filing entity for the specified period. Links are created under the Govern Home tab in the Dashboard area.
Configuration
The setup of this View Query Link type is made in the Profile Editor of the Govern New Administration
Examples of the use of the three types of view query links can be observed in the attached documentation.
Importance of Syntax
Modifying the Query
To modify the query, we will use the SQL Query editor in the GNA. The following queries are to be modified for this example:
- smPC07 – Current Owner Names & Address
- smPC08 – Previous Owner Names & Address
Before we can modify the column we need to change to a link, we need to add another column.
- On the GNA Ribbon, go to GNA > Editors (tab) > Select Query Editor.
- Look for the smPC07 query; click to select this query for editing.
- In the editor we will add another column BEFORE the column that is to be changed to a link.
‘Form=NA01;NA_ID’ + CAST(NA_ID AS VARCHAR) ‘<LINK>’
Proper use of the <LINK> tag
When the ‘<LINK>’ tag is seen before the column, this is an indication that the column is to be hidden and the link information is to be applied to the next column.
DEVNOTE: The Same column can be added twice if single quotes ‘aLink’ are used; there is a restriction if double quotes “” are used.
NEW Select a specific Entity on the form
An enhancement has added to the View Query Link functionality. It is now possible to open a form and re-position to a specific entity within the form. The ID can then be auto-selected by setting the Govern ID.
To access a specific form and tab item, use the following syntax for the query…
‘Form=FormNum:EntityName;NA_ID=’
…where <FormNum> is the Govern form number, e.g. ST007 immediately followed by a colon “:”, then the <EntityName>, e.g. ST-Filing. There are no spaces between any of the names. Here is an example that will access the Self Reported Tax form (ST007), and specifically target the ST-Filing entity. The Govern ID is then specified, in the following case, an NA_ID
‘Form=ST007:ST_Filing;NA_ID=’
NOTE: If the entity specified in the query is not available, the result will default back to the top level form. |
Key Parts of the Modification to the Query
The modifications needed for the query are made up of three (3) parts.
- The column must be named as follows: ‘<LINK>’
- Indicate what the column is to return NA_ID’ + CAST(NA_ID AS VARCHAR)
- The form that is to be opened. ‘Form=NA01;NA_ID’
i.e. the form NA01 is to be set with the NA_ID. Alternatively, the syntax can also be modified to open a report by referencing the report name: ‘Report=NA01;NA_ID’
NOTE: The order of the information is important. The column that will have the link will always be on the next column. |
Error Handling Messages:
DEVNOTE: If a code is entered for a non-existent form, an error message is invoked: This form is not accessible, review with your administrator. |
If the configuration was performed correctly, the P_ID will be changed. Incorrect configurations can result in errors. Often the error that is encountered is related to syntax. For example an error screen such as the following may be displayed.
In the following, the “=” was missing from the p_id portion of the query.
‘p_id’+ @attrX + ‘;na_id=’ + @attrY (ERROR)
‘p_id=’+ @attrX + ‘;na_id=’ + @attrY (OK)
Documentation
Below is the documentation related to this feature:
101-std-fea-036-View_Query_Link.pdf
Related Topics
Business Tax – Corporate Account
Govern Standard Module Product Map
101-std-fea-036