Highlighted
Absent Member.. Absent Member..
Absent Member..
463 views

How to set validation for approve button

Jump to solution

Hi All,

I have requirement like, if i click on approve button it should show a validation message before opening new window for comments.

Please suggest me.

Regards,

Anjan RH

0 Likes
1 Solution

Accepted Solutions
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: How to set validation for approve button

Jump to solution

@AnjanRanganatha wrote:

The user is able to see the form and customized field as well, But my condition is not matching to display error message while clicking on approve button without filling the partial approve field.


I don't know the exact id of the displayoption, but it sounds like you know which one it is. Try putting this into the Post Javascript of that displayoption:

if (system.vars.$L_file.partial_approve == null) {
    system.vars.$L_ds_action = "redraw";
    var mbRc;
    var mbPar = new SCDatum();mbPar.push("text");
    var mbVal = new SCDatum();mbVal.push("Please select a value for Partial Approve.");
    system.functions.rtecall("callrad", mbRc, "mb.ok", mbPar, mbVal, true);
   }

View solution in original post

0 Likes
6 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: How to set validation for approve button

Jump to solution

There is mb.ok Rad which calls notification window but it wont have Yes\No buttons.

Dont recall if there is such RAD which can call a popup with Yes\No.

If there is not, you can try to make a wizard screen to either go to comments or go back to the Approval window.

 

 

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How to set validation for approve button

Jump to solution

Hi Vadim,

Thanks for your replay.........

I tried the rad function mb.ok. It should show only pop-up message, that is not a validation message.

My requiremwnt is like, i have  customized field in change management approval form(field name: partial.approve values:yes/no). If the partial.approve filed is empty and if click on approve button it should not go to for approval comments window, it should be in the same form and displaying the error message like "please select partial Approve".

Previously i tried below configuration.

in dispaly option:

button name :approve

pre-rad expression: if not (null(partial.approve in $L,filed) then $L.message="Please select Partial Approve"

Rad

name : text

value : $L.message

Please suggest to achive this requirement.

 

Regards,

Anjan RH

 

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: How to set validation for approve button

Jump to solution

AnjanRanganatha wrote: i have  customized field in change management approval form(field name: partial.approve values:yes/no). If the partial.approve filed is empty and if click on approve button it should not go to for approval comments window, it should be in the same form and displaying the error message like "please select partial Approve".

Can you post a screenshot of this form? You can probably just conditionally change the action on the displayoption, but I am thinking of people who approve from the Approval Queue - they might not even see that form (depending on your configuration).

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How to set validation for approve button

Jump to solution

Hi Achandler,

Thanks for your replay,

The user is able to see the form and customized field as well, But my condition is not matching to display error message while clicking on approve button without filling the partial approve field.

Please find the attached form.

 

Regards,

Anjan RH

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: How to set validation for approve button

Jump to solution

@AnjanRanganatha wrote:

The user is able to see the form and customized field as well, But my condition is not matching to display error message while clicking on approve button without filling the partial approve field.


I don't know the exact id of the displayoption, but it sounds like you know which one it is. Try putting this into the Post Javascript of that displayoption:

if (system.vars.$L_file.partial_approve == null) {
    system.vars.$L_ds_action = "redraw";
    var mbRc;
    var mbPar = new SCDatum();mbPar.push("text");
    var mbVal = new SCDatum();mbVal.push("Please select a value for Partial Approve.");
    system.functions.rtecall("callrad", mbRc, "mb.ok", mbPar, mbVal, true);
   }

View solution in original post

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How to set validation for approve button

Jump to solution

Hi AChandler,

Thank you so much for your reply...

A achieved the above requirement using RAD message.fc

and also even i tried altering your java script it is working fine....

Regards,

Anjan RH

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.