Calling one form from another with button.

Sort:
You are not authorized to post a reply.
Author
Messages
wilcoxmad
Veteran Member
Posts: 87
Veteran Member

    I'm trying to call one custom form from another and pass some data to the second:

                    if (id == "push1")

                    {

                    var vCompany=lawForm.getFormValue("text1");

                    var vYear = lawForm.getFormValue("text3");

                    var vQtr = lawForm.getFormValue("text4");

                    var vEmp = lawForm.getDataValue("MANAGER",0);

     

                    var sURL= portalObj.path+"?_TKN=CC42.1&QIC-COMPANY="+

                    vCompany+"&SUPER-EMP="+vEmp+"&QIC-YEAR="+vYear+"&QIC-QUARTER="+vQtr;

             alert (sURL);      

                    window.open(sURL);

                     return true;

                   

                    }

     
    Do y'all see anything wrong with this? When it opens the form nothing is filled out it’s just blank! I would like to have the second form do an inquiry when it pops up too!

    Thanks.

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      If you have ProcessFlow, go into an Email and launch the Portal URL Builder (Insert Form URL). This will give you the syntax that you need to launch another form, passing the correct key fields. Keep in mind that if, for example, your company value is 1, that you will have to have to fill it in order to pass this as a 4 character field.
      David Williams
      wilcoxmad
      Veteran Member
      Posts: 87
      Veteran Member
        David,

        When I did that, this is what I see: MyURL?_PDL=DEV&_TKN=CC42.1&_HK=0001000001971.

        Since I am trying to Inq the HK shouldn't matter.

        David Williams
        Veteran Member
        Posts: 1127
        Veteran Member
          I don't know what you mean by the HK shouldn't matter? When you launch that url the Inquire should work by default.
          David Williams
          wilcoxmad
          Veteran Member
          Posts: 87
          Veteran Member

            David,

            Thanks for your help, I tried the HK and I am still getting a blank form.

            Any suggestions?


             if (id == "push2")
                            {
                            var vFC="I"
                            var vCompany=lawForm.getFormValue("text1");
                            var vYear = lawForm.getFormValue("text3");
                            var vQtr = lawForm.getFormValue("text4");
                            var vEmp = lawForm.getDataValue("MANAGER",1); 
                            var vEmp2 = portalWnd.oUserProfile.getAttribute("employee"); 
                            var vHK = "000100000197120132"
             
              var sURL= portalObj.path+"?_TKN=CC42.1&_QIC-COMPANY="+
                            vCompany+"&_SUPER-EMP="+vEmp+"&_QIC-YEAR="+vYear+"&_QIC-QUARTER="+vQtr+"_HK="+vHK;

                             alert(sURL);

                            window.open(sURL);

                            return true;
                 }

            David Williams
            Veteran Member
            Posts: 1127
            Veteran Member
              Try var sURL= portalObj.path+"?_TKN=CC42.1&_HK="+vHK
              David Williams
              wilcoxmad
              Veteran Member
              Posts: 87
              Veteran Member
                Well, that is better. I am getting the company and employee now. Still need the quarter and year!

                You are not authorized to post a reply.