Highlighted
Super Contributor.
Super Contributor.
924 views

Message Pop Up using Javascript in a Rule SM 9.34

Hi , I'm working with SM Version: 9.34.2003 build P2  and I've been reading this post :

/t5/Service-Manager-Service-Center/Pop-Up-Message-Box-Use-Javascript/m-p/6777873#M127999

because I'm trying to validate a date field against the calholidays table and the messages must be validation type not information only, for the user to change the date properly.

I attach the javascript code.  Perhaps I'm doing it wrong and "Message Box : eval script" is not available in SM 9.34   or  there's another way to do it (or there's no way).

Thanks in advance

 

Good questions will have Good answers
0 Likes
2 Replies
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Could try this if you don't use PD. 

function domessageBox(message)
{

if(vars.$G_bg || vars.$L_bg || system.functions.nullsub(vars.$G_ess, false))
{
print(message);
return;
}

var rteReturnValue = new SCDatum();
var argNames = new SCDatum();
var argVals = new SCDatum();
argVals.setType(8); //type array
argNames.setType(8); //type array
var argVal;

argVal=new SCDatum();
argVal.setType(2); //string
argVal="text";
argNames.push(argVal);

argVal=new SCDatum();
argVal.setType(2); //string
argVal=message;
argVals.push(argVal);

 system.functions.rtecall("callrad",
rteReturnValue,
"mb.ok", //RAD app name
argNames,
argVals,
true); //false to run in same thread, true to run in new thread
}

mb.ok is the rad app for a messag box. 

 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Validation of format control can check and then popup message.

Don't you want this ?

0 Likes
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.