Super Contributor.. Super Contributor..
Super Contributor..

SM 9.4 - possible to do if statement in format control validation?

I would like to do an if statement for a format control validation.


if id in $file is not null and contract.date in $file is null then run the validate error message 

if id in $file is null and contract.date in $file is null then DO NOT run the validation error

is this even possible?

2 Replies
Honored Contributor.. Honored Contributor..
Honored Contributor..

Yes, I believe you can. Just use something that already exists as a guideline, such as from SD.open.interaction to see the correct syntax.

Acclaimed Contributor.
Acclaimed Contributor.

...or if you doubt your skills, you can move your business logic to external ScriptLibrary file and use RAD function jscall to run it. For example:

$myvariable=jscall("myScript.myFunction, contract.date in $file)

Or if your code returns true or false, you can of course use the jscall call alone without a variable to trigger the variable error.

Moving on, this account is no longer active. Best regards, Kelalek
- So Long, and Thanks for All the Fish
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.