If [20014] = "Motor" Then If IsNull([20011]) Or Trim([20011]) = "" Then ValidationResult = False ValidationMessage = "Motor requires a description in Description 1." Else ValidationResult = True End If Else ValidationResult = True End If If you tell me and condition you need, I can generate the exact validation code text for your EPLAN P8 2.0 project.
To prepare text for (often referred to as Check Code or Validation Rule ), you must write a VB Script or use the Validation Rule editor in EPLAN. Eplan P8 2.0 Validation Codel
Not IsNull([PropertyID]) And Len([PropertyID]) > 5 A. Validate that a field (e.g., “Tag” property) is not empty Not IsNull([20010]) And Trim([20010]) <> "" B. Validate that “Length” (property 10007) is between 1 and 100 [10007] >= 1 And [10007] <= 100 C. Validate that “Device tag” follows pattern: starts with ‘-’ then letters/numbers Not IsNull([20010]) And [20010] Like "-*" And Len([20010]) >= 2 D. Validate that a numeric field is positive [10005] > 0 E. Validate that two fields are not equal (e.g., “Start pin” ≠ “End pin”) [20020] <> [20021] 3. Multi‑Line Validation with Message (advanced) In EPLAN, you can embed the validation text in a script to provide custom error messages: If [20014] = "Motor" Then If IsNull([20011]) Or