2. Configuring dependencies between fields

In your submission template, you edit the field that is controlled by other fields, enable dependencies, and specify your script and fields that control this field.

Before you begin

  • You created and tested your scripts externally to IBM Spectrum LSF Application Center. You have Linux and Windows scripts as required. For more information, refer to 1. Writing your script.
  • Fields that control other fields must be located in the submission template before the fields that are controlled.
  • If the field controlled by another field is an input file field, only input files from the web server can be selected. Selection of local input files is not supported.

Procedure

  1. Edit the submission template that contains the field for which you want to configure dependencies.
    1. Choose Resources > Submission Resources > Submission Templates.
    2. Select the application.

      If the application is already published, select it and click Unpublish.

    3. Choose Modify.

      The Modify Template window is displayed.

  2. Add the fields to your submission template.

    Ensure that the field that controls another field is listed before the controlled field in the submission template.

    For example, if the selected number of CPUs in the Number of CPUs field controls which queue is available for selection, add the fields in the submission template in this order:
    • Number of CPUs drop-down field with ID: NCPU
    • Queue drop-down field with ID: QUEUE
  3. Select the dependent field and click Edit.

    For example, select the Queue field.

    The Edit Field window is displayed.

  4. Complete this step only if users are accessing the submission form through the web browser. Click Enable Dependenciesand configure the dependency.
    1. In the Dependency Script field, specify the Linux script for the desired behavior.

      The script must be on a shared directory accessible by the web server. After you save the submission template, the script is copied to the application directory on the IBM Spectrum LSF Application Center server.

      For example, if you were modifying ABAQUS, the script is copied to $GUI_CONFDIR/application/draft/ABAQUS.

    2. In the This script controls fields, check all areas that your script affects.

      What you select in this field is for information purposes so that you know what your script affects, but does not enable or disable any functionality. It is a summary for your convenience so you do not need to read your script to know what it does.

    3. In the Linked Fields field, add the fields that control this field. Field IDs are displayed in the drop-down list.
    4. Click Save.

      A dependency between the two fields is created and the script you specified is copied to your application directory.

  5. Publish your application and test your form by accessing it through a web browser.
  6. Complete this step only if users are accessing your submission form with IBM Spectrum LSF Application Center Desktop Client.
    1. Select the application.

      If the application is already published, select it and click Unpublish.

    2. Choose Modify.

      The Modify Template window is displayed.

    3. Select the dependent field and click Edit.

      For example, select the Queue field.

      The Edit Field window is displayed.

    4. Click Enable Dependencies in IBM Spectrum LSF Desktop Client because users are accessing the submission form with IBM Spectrum LSF Application Center Desktop Client.
    5. In the Dependency Script field, specify the Windows script for the desired behavior.

      The script must be on a shared directory accessible by the web server. After you save the submission template, the script is copied to the application directory on the IBM Spectrum LSF Application Center server. For example, if you were modifying ABAQUS, the script is copied to $GUI_CONFDIR/application/draft/ABAQUS. When a user accesses the submission form in IBM Spectrum LSF Application Center Desktop Client, the script is copied to the user's Windows workstation and run.

    6. In the This script controls fields, check all areas that your script affects.

      What you select in this field is for information purposes so that you know what your script affects, but does not enable or disable any functionality. It is a summary for your convenience so you do not need to read your script to know what it does.

    7. In the Linked Fields field, add the fields that control this field. Field IDs are displayed in the drop-down list.
    8. Click Save.

      A dependency between the two fields is created and the script you specified is copied to your application directory.

    9. Publish your application and test your form by accessing it through IBM Spectrum LSF Application Center Desktop Client.