Audrey H. Acclaimed Contributor.
Acclaimed Contributor.
678 views

Want to change the message generated by a Mandatory Variables Rule

Jump to solution

Hi,

 

I'm using a Mandatory Variables Rule to set the $pmc.actions (Update ) of an IM as mandatory under certain condition, but the message that comes up when it is not filled is "$pmc.actions is required".  I want it to say "Update is required".  Does anyone know if this is possible and if so where I can configure this?

 

Audrey

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Want to change the message generated by a Mandatory Variables Rule

Jump to solution

Hi,

 

You could use a javascript validation instead of the Mandatory rule set. The following is the code you may add to that validation:

 

-----------------------

if (vars.$pmc.actions== "{}")

 

{

 

   returnCode = 1;

 

   message=system.functions.scmsg (2, "ruleset_chm",  ["Update is required"]);

 

   cursorPosition = "$pmc.actions";

 

}

-----------------------

 

That code could be used for fields and variables and you can add more than one in the same js validation.

 

Regards,

If you feel this was helpful please click the KUDOS! thumb below!
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Want to change the message generated by a Mandatory Variables Rule

Jump to solution

Hi,

 

You could use a javascript validation instead of the Mandatory rule set. The following is the code you may add to that validation:

 

-----------------------

if (vars.$pmc.actions== "{}")

 

{

 

   returnCode = 1;

 

   message=system.functions.scmsg (2, "ruleset_chm",  ["Update is required"]);

 

   cursorPosition = "$pmc.actions";

 

}

-----------------------

 

That code could be used for fields and variables and you can add more than one in the same js validation.

 

Regards,

If you feel this was helpful please click the KUDOS! thumb below!
Audrey H. Acclaimed Contributor.
Acclaimed Contributor.

Re: Want to change the message generated by a Mandatory Variables Rule

Jump to solution

Hi Luis,

 

Thanks very much for the response.  I figured I could do it by a javascript, but before doing that I wanted to know if there was an actual place we were suppose to modify this and that I just wasn't aware of it.  HP told me that there is currently a defect opened regarding this issue, but that it is in "deferred" status and they gave me a workaround, which is basically as you suggested.  The script is slightly different but it does the same thing.   Thanks.

 

Audrey

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Want to change the message generated by a Mandatory Variables Rule

Jump to solution

Hi Audrey,

 

I am happy it worked for you.

 

Regards,

If you feel this was helpful please click the KUDOS! thumb below!
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.