How to set validation for approve button

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

  • 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.

     

     

  • 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.

     

     

  • 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.

     

     

  • 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

     


  • 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).

  • 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

  • Verified Answer


    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);
       }
  • 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