3 Replies Latest reply on Jul 20, 2017 10:15 AM by Vikram Reddy

    Need the Instructions field in the Service Request form to be expanded automatically.

    Vikram Reddy
      Share This:

      Hi Team,

       

      Requirement : In General while submitting the Service Request (SR), user clicks on the 'Request Now' button, then the respective SR will be opened with the Questions to be answered and submit the SR. For looking at the Instructions, end user has to click on the Instructions field and expand it.

       

      My customer requirement is Instructions field should be expanded automatically on open of the SR itself.

       

      Tried solution: In the 'SRS:SREC_ProvideInformation' form, for the instructions field, we have modified the property of "Expand Box = Show" as shown in the attachment and cached the midtier, removed the browser cache. Still we see that the 'Instructions' field is not expanded automatically.

       

      Kindly help us in achieving this task.

        • 1. Re: Need the Instructions field in the Service Request form to be expanded automatically.
          Ron Galbraith

          Off the top of my head I can only think of one possibility (worth a try anyway).  Run an Active Link on a Window Loaded, at the end of the Active Link Execution Order and run the process PERFORM-ACTION-ACTIVE-LINK in an If action.

           

          Not sure which action would do it but maybe one of these?  This is essentially spoofing what the user would do through the GUI, rather than controlling the object itself as a default.

          • Return/Table Dbl-Clk: PERFORM-ACTION-ACTIVE-LINK 2 < field_ID>

          • Expand: PERFORM-ACTION-ACTIVE-LINK 33554432 < field_ID>

          • 3. Re: Need the Instructions field in the Service Request form to be expanded automatically.
            Vikram Reddy

            1) From the Data Visualization Module, copied the SRMSServiceRequestBrowser.jar to the desktop.

            2) Unzipped it and modified the “provide_info” file under  the path SRMSServiceRequestBrowser\resources\javascript.

            3) Modified the code from

            $(function () {

                instdraw = true;

                    $("#dvf_ok_err").click(function () {

                    $("#error_msg_div").hide();

                });

                if ($("#display_instruction_text")) {

                    try {

                        var testHtml = parent.updateRtfHtml(0, $("#display_instruction_text").html(), srdRequstId, server, 'SRD:ServiceRequestDefinition');

            $("#display_instruction_text").html(testHtml);

                    } catch (err) {

                        showErrorMessageForSR(err);

                    }

                }

            $("#instruction_handler").click(function () {

                    if (instdraw) {

                        instdraw = false;

            $("#instructions").slideDown("fast");

            $("#instruction_handler").attr("class", "up");

                    } else {

                        instdraw = true;

            $("#instructions").slideUp("fast");

                        $("#instruction_handler").attr("class", "down")

                    }

                });

             

            To

            $(function () {

                instdraw = true;

                           

                            //Modified Code

                           

                            if (instdraw) {

            instdraw = false;

            $("#instructions").slideDown("fast");

            $("#instruction_handler").attr("class", "up");

            }

             

                            //Modified Code

                           

                $("#dvf_ok_err").click(function () {

                    $("#error_msg_div").hide();

                });

                if ($("#display_instruction_text")) {

                    try {

                        var testHtml = parent.updateRtfHtml(0, $("#display_instruction_text").html(), srdRequstId, server, 'SRD:ServiceRequestDefinition');

            $("#display_instruction_text").html(testHtml);

                    } catch (err) {

                        showErrorMessageForSR(err);

                    }

                }

            $("#instruction_handler").click(function () {

                    if (instdraw) {

                        instdraw = false;

            $("#instructions").slideDown("fast");

            $("#instruction_handler").attr("class", "up");

                    } else {

                        instdraw = true;

            $("#instructions").slideUp("fast");

            $("#instruction_handler").attr("class", "down")

                    }

                });

            4) Saved the file “provide_info”

            5) Created the zip of the “SRMSServiceRequestBrowser” in the command prompt with below command

            C:\Users\Desktop>jar cMf SRMSServiceRequestBrowser.jar SRMSServiceRequestBrowser

            6) Copied it to again the “SRSServiceRequestConsole” entry of the Data Visualization module.

            7) Stopped the Tomcat, cleared the folders PluginsDefCache and PluginsCache. Started the tomcat. Flushed the midtier cache. Cleared th browsers memory

            8) Clicked on the Request Entry link by logging in and below is the error message.

            Error MEssage.png

             

            Please guide me i am wrong at any step.