Script requirements

You can use a Windows or Linux script to define dependencies between fields.

Do I need a Linux or Windows script?

IBM Spectrum LSF Application Center supports Linux scripts for submission forms that are accessed with a web browser.

IBM Spectrum LSF Application Center also supports Windows scripts for submission forms that are accessed with IBM Spectrum LSF Application Center Desktop Client.

If you have users that are accessing submission forms with a web browser and with IBM Spectrum LSF Application Center Desktop Client, you need to create both Linux and Windows scripts.

What are the requirements for my script?

The script file must:

  • Be an executable. Can be written in any scripting language.

  • Be tested to ensure that it works before it is used in IBM Spectrum LSF Application Center.

  • Take as input value the environment variable with the name of the field ID of the field that affects another field. The variable name is the field ID.

  • Output a fixed-format XML message through stdout. For example:

    echo "<field-control visible=\"true\" type=\"content\">"
    echo "<option value=\"1\" selected=\"true\" /> "
    echo "<option value=\"2\" />"
  • Be located in a shared directory accessible by the IBM Spectrum LSF Application Center web server.

What is the script format?

<field-control visible="true|false" type="content|default">
<option value="value" selected="true | false"/>
     …
</field-control>

<field-control> attributes:

Name Description Valid values
visible Required. Specifies whether the field is displayed or hidden. Specify true if the field is to be displayed in the submission form, false if the field is to be hidden. true | false
type Required. Specifies whether the script changes the content of the field or only the default value. content | default

<option> attributes:

Name Description Valid values
value Required. Specifies the value that this option contains. Alphanumeric values.
selected You can omit this attribute for options that do not contain the default value. Specifies whether this value is the default value for the field. Specify true if this value is the default value for the field, false if it is not. true | false