Skip to content

Configuring Programs

This page describes how to configure the deployed programs for use in the Invocation section of the Altair SLC Hub portal.

Program configuration is defined in the package metadata, including the program file, parameter handling, and input parameters displayed in the Run program dialog box.

Defining program parameters

Program parameters are defined in the package YAML (hubpackage.yaml) for the deployed program. These parameters control the inputs displayed in the Run program dialog box.

Example:

programFile: sas/CarsQuery.sas
parameterStyle: macroVars
parameters:
  make:
    datatype: choice
    label: Make
    required: false
    fixed: false
    hidden: false
    repeatable: false
    choicesService: "./CarsMake"
  model:
    datatype: string
    label: Model
    required: false
    fixed: false
    hidden: false
    repeatable: false
    autocompleteService: "./CarsModel?make={make}&model={model}"

In this example, make is a choice field populated by choicesService, and model is a string field that displays suggestions from autocompleteService as text is entered.

Note

Although both properties use a service-based approach, their response formats differ:

  • choicesService is used with choice parameters to populate a list of available values.
  • autocompleteService is used with string parameters and requires the service to return a JSON array of strings.

String parameters with autocomplete

For parameters with datatype: string, you can use autocompleteService to provide suggested values when text is entered into the field.

Example:

parameters:
  model:
    datatype: string
    label: Model
    autocompleteService: "./CarsModel?make={make}&model={model}"

As text is entered in the model field, Altair SLC Hub calls the configured autocomplete service and displays the returned suggestions.

Note

The service is called only when the user has typed something in the field.

autocompleteService format

Use autocompleteService to specify a relative URL for the service that returns autocomplete suggestions.

Example:

autocompleteService: "./CarsModel?make={make}&model={model}"

In this example:

  • ./CarsModel specifies the service to call.
  • make={make} passes the current value of the make parameter.
  • model={model} passes the current value of the model parameter, which is the text entered so far.

The URL is resolved relative to the deployed program URL.

Parameter references in the URL template

Parameter values in autocompleteService are referenced using URI template syntax with curly braces.

Example:

autocompleteService: "./CarsModel?make={make}&model={model}"

In this example:

  • {make} refers to the value of the make parameter.
  • {model} refers to the current value of the model parameter.

For example, if make is set to BMW and X is entered in the model field, the request is sent to the configured URL with those parameter values inserted.

The template syntax follows RFC 6570 URI Template. Parameter names must match the parameter names defined in the package YAML.