Using Query Strings - Public Sector Constituency Web Access - English - Foundation 22.1 - OnBase - external

Public Sector Constituency Web Access

Platform
OnBase
Product
Public Sector Constituency Web Access
Release
Foundation 22.1
License

A query string is part of a URL which can be used to pass additional, dynamic data to a web application. You can configure the Public Access front-end client to use data from a query string to automatically load specified queries, folders, or even Keyword Values to search on. Once the front-end is configured, a query string can be appended to the URL used to access the it, and the client will function as specified without the need for user action.

A Public Access query string contains one or more query sting fields, which each hold a value representing a piece of data passed to the front-end. Query strings begin with a ?(question mark) character, then the field name, an =(equals) character, and a value for that field. Additional fields must be preceded by an &(ampersand) character. The structure of a URL with a query string containing two fields would be as follows:

http://example.com/PublicAccess/index-cq.html?[Field1]=[Value1]&[Field2]=[Value2]

For example, if your front-end client normally lists several available queries in the Search Type drop-down list but you want to provide users with a link that directs them to a specific query, you can create a query string field to hold the ID number of the Custom Query. The query string field is defined in obpa-config.json as a value for one of the QSField keys, depending on what type of data the field contains. Following the example, to allow a Custom Query to be preselected you would use the selectedQueryIdQSField key, setting the value to the name of a new query string field (CQID in this example):

"selectedQueryIdQSField": "CQID"

Then, you can provide your users with the following URL to have Custom Query #105 preselected for them:

http://example.com/PublicAccess/index-cq.html?CQID=105