Syntax to configure validations for fields

To configure UI validation for an extension, enter the string in UI Validation field on Extension or Search field details screen. Following table shows the syntax for few validations:

Table 1. UI Validation Syntax
Validation Description Validation Key Syntax
Hide Destination field depending on value in the Source field HI 1: (HI) SAP FieldName1 IF SAP FieldName2 (V)SAP FieldName2Value
Auto-populate the Destination field depending on value in the Source field AP 1:(AP) <PROPERTY1> EQ (V) IF <PROPERTY2> EQ (V)YES
Auto-populate the Date field DAP 1:(DAP) <PROPERTY1> EQ (V) IF <PROPERTY2> EQ CD
Disable the Destination field depending on value in the Source field DI 1:(DI) PROPERTY1 IF PROPERTY2 #R EMPTY AND/OR PROPERTY3 EQ
Disable the Date field depending on value in the Source field DDI 1:(DDI) PROPERTY1 IF PROPERTY2 EQ CD
Make a field as Mandatory M 1: (M)(E) <PROPERTY> #R MANDIT IF <PROPERTY> #R EMPTY
Show an error when the field value is not specified. E 1:(E) <PROPERTY> EQ MANDIT IF <PROPERTY> #R (V)Value1, (V)Value2 OR <PROPERTY> #R (V)Value
1:(E) <PROPERTY> EQ MANDIT IF <PROPERTY> #R (V)Value1, (V)Value2 AND <PROPERTY> #R (V)Value 4: (D)(E) <PROPERTY> #R CD
Regular Expression RE 1:(RE) PROPERTY1 EQ Regular Expression
Prompt if the value entered in the field is current date D 1:(D)(E) <PROPERTY> #R CD

Following are a few scenarios to show how UI validations works:

Table 2. UI Validation - Scenarios
Validation Description Syntax
Empty/Null Validation 1:(E) <PROPERTY1> EQ MANDIT IF <PROPERTY2> EQ EMPTY
Value Validation with EQ condition 1:(E) <PROPERTY1> EQ MANDIT IF <PROPERTY2> EQ (V)Value
Value Validation with OR condition 1:(E) <PROPERTY1> EQ MANDIT IF <PROPERTY2> EQ (V)Value1 OR <PROPERTY3> (V)Value2
Value Validation with AND condition 1:(E) <PROPERTY1> EQ MANDIT IF <PROPERTY2> EQ (V)Value1 AND <PROPERTY2> (V)Value2
Value Validation with between condition 1:(E) <PROPERTY1> EQ MANDIT IF <PROPERTY2> BT (V)Value1 AND (V)Value2
Auto-populate validation with OR condition 1:(AP) PROPERTY1 EQ (V)Value1 IF PROPERTY2 EQ (V)Value2 OR PROPERTY3 EQ (V)Value3
Prompt to enter Activity field if the Network value is specified
  1. UI Validation: 1:(E) AUFPL EQ MANDT IF NPLNR NE EMPTY. This Boolean expression means that 'AUFPL (Activity field) is Mandatory if NPLNR (Network field) is not equal to Blank'.
  2. UI Validation message: 1:(E) Please enter the Activity value

Result: App shows the error message: 'Please enter the Activity value', if you do not enter value in Activity field when the Network field has a value.

Prompt to enter the WBS Element if Special Stock Indicator is Q
  1. UI Validation: 1:(M)(E) PS_PSP_PNR MANDIT IF SOBKZ EQ (V)Q. This Boolean expression means that 'WBS Element (PS_PSP_PNR) is Mandatory if the Special Stock Indicator (SOBKZ) value is equal to 'Q''.
  2. UI Validation message: 1:(E) MESSAGE Fill the WBS Element value

Result: App shows the message: 'Fill the WBS Element value' if you enter the Special Stock Indicator value as 'Q'.