Syntax for Variable Parameter Values in Query Result Links

When you add a URL to a query, for the parameter values you can pass in any data from the records that are returned by the query. For example, if your query selects Asset records from the database, you could pass data from the Asset records to the URL parameter values. In this case, you will use a $ (dollar sign) to specify that the parameter value is variable.

For example, consider a query that returns a list of Pumps in the database. You could construct a URL for the Asset ID column of the query so that in the query results, a link would appear to open each record in the Record Manager. In this case, instead of specifying a particular Entity Key in the URL to create a static link that would open the same record every time, you would need to specify a variable parameter value so that the URL would be populated with the appropriate Entity Key, depending upon which specific results were returned by the query. The URL that you would add to the Asset ID column in the query would look like this:

meridium://Registry/RecordManager?EntityKey=$EntityKey$&FamilyKey=$FamilyKey$

This URL contains two variable parameter values, which are shown in blue:

Note that each variable value is denoted by dollar signs that surround the variable name. Typically, the variable name will be the Alias for a field in the query but may vary depending on how the query has been configured. In this example, the variable names Entity Key and Family Key correspond to the Aliases for system fields and will be replaced with actual Entity Keys and Family Keys when the URLs are constructed at run time. You will need to choose a variable that is supported and is appropriate for the URL parameter.

Note: Whenever you pass in a value from a field that is included in the query results, you can use the Alias between the dollar signs, provided that an Alias has been defined. If an Alias is not defined, you can pass in the field ID. We recommend, however, that you define Aliases for every field that will be included in the results. Because Aliases must be unique, this helps eliminate ambiguity in cases where a query uses multiple tables and contains more than one hyperlink, each of which accepts similar values from different tables.

While our example shows how you can pass variable Entity Keys and Family Keys in as URL parameter values, note that you can pass in ANY value that is included in the query and is appropriate for the URL. For example, if your query includes a URL that uses the AssetID parameter, you could pass in a variable Asset ID as the parameter value. You might also pass values from the query results to query prompts in order to link from one query to another.

Note the following about passing variable values in to hyperlinks in queries:

Copyright © 2017 General Electric Company. All rights reserved.