Create a dependent variable - HxGN SDx - Update 63 - Administration & Configuration

Administration and Configuration of HxGN SDx

Language
English
Product
HxGN SDx
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
10

A dependent variable represents data that can be fetched using a Web API URL built on the base URL that is specified in the Web API created for connecting to a third-party application. The URL suffix specified in the import definition depends upon this variable to fetch data.

For example, units are dependent on areas. Area can be a dependent variable which presents the URL to fetch the areas. The areas can be an input to the import definition for units, where the system can fetch the units under each area.

After the import definition is created in Data Validator Administration, you can navigate to the Web Client and create a dependent variable using the import definition. The URL Suffix option in the import definition form can be updated with the dependent variable in Data Validator Administration to return the desired data.

The following is an example of a dependent variable that will be used in the URL Suffix option to return the top 10 instruments:

VAR_INSTRUMENT_SPID = Sites('PID1')/Plants('PLANTA')/Instruments?$top=10&$select=SP_ID

URL Suffix = Sites('PID1')/Plants('PLANTA')/Instruments?$filter=SP_ID eq '{{VAR_INSTRUMENT_SPID}}'

You cannot reference a dependent variable in the URL Suffix text box when creating an import definition in Data Validator Administration. Here, a URL suffix without a dependent variable will be considered valid.

  1. In the Data Validator feature set, select Web API Reader Import Definitions.

  2. From the grid that is displayed, select the required import definition.

  3. Click Actions > Web API Reader Import Definition Variable.

  4. In the New Web API Reader Import Definition Variable page, enter the information as required.

  5. Click Finish.