Example: Display the Memory Architecture field only when xBatch mode is selected(Windows)

In this example, the value of the Mode field determines whether the field Memory Architecture is displayed. A Windows script is required since users are accessing the submission form through IBM Spectrum LSF Application Center Desktop Client.

When a user selects the value xBatch in the Mode field, the field Memory Architecture is displayed. If a user selects any other value in the Mode field, the Memory Architecture field is not visible.

  1. Create your Windows script and test that it works on Windows. After you have verified it works, copy the Windows script to a Linux directory accessible to the IBM Spectrum LSF Application Center web server.
    @echo off
    if "%S_MODE%" == "xBatch" (
    	echo ^<field-control visible="true" ^>
    	echo ^</field-control^>	
    ) else (
    	echo ^<field-control visible="false" ^>
    	echo ^</field-control^>	
    )
    @echo on
  2. Unpublish your submission template.
  3. Add the fields to your submission template. Ensure the Mode field is listed before the Memory Architecture field since the Mode field controls the Memory Architecture field.
    • Mode drop-down field with ID: S_MODE
    • Memory Architecture drop-down field with ID: MEMARC
  4. Edit the Memory Architecture(MEMARC) field and specify dependencies for the field.
    • Select Enable Dependencies in IBM Spectrum LSF Application Center Desktop Client, specify your Windows script, and add the S_MODE field as a linked field. This setting enables the dependent field behavior for users who are accessing the submission form through IBM Spectrum LSF Application Center Desktop Client.
    Mode linked field for dependencies
  5. Save and publish your template.
  6. Test your template.
    • Go to a Windows host and open IBM Spectrum LSF Application Center Desktop Client. Go to Submission Forms, select your form and test that whenever you select the xBatch mode, the Memory Architecture field displays.