CHECK_CURRENT_FORM Function

RAMP-TS

CHECK_CURRENT_FORM Function

Check that RAMP is showing a screen.

Syntax

CHECK_CURRENT_FORM(sFormName [, sMessageText1] [, sMessageText2] ...)

Parameters

sFormName

Required. String that specifies the Name of the Form

sMessageText1

Optional. String that contains the first message to be issued.  

sMessageText2

Optional. Other strings that are to be concatenated with the first message string (a separator space is automatically added between each string). 

 

Return Value

Boolean. Returns one of the following possible values:

true

The form currently shown has the form name specified.

false

The form currently shown does not have the form name specified.

 

Remarks

Used for checking whether the script or user has progressed to a particular screen, or has stopped at an earlier screen.

If the CHECK_CURRENT_FORM returns false, the function will also automatically hide the Current RAMP screen and display the message provided.

If the script wants to test that the expected screen has arrived, and yet still display the current screen if it hasn't, it should not use function CHECK_CURRENT_FORM, but instead use

  

if (CURRENT_FORM() == "My_Form");

  

When you are writing scripts that handle validation errors on a screen, you usually want the current screen to be displayed even if a validation error occurred and the user has not progressed to the expected next screen. So in this situation you should not use CHECK_CURRENT_FORM.

Example

 

if ( !(CHECK_CURRENT_FORM("uItemMasterBrowse","Unable to navigate to form uItemMasterBrowse")) ) return;