Passing values from one form to another

 13 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Todd
Basic Member
Posts: 7
Basic Member
    I'm trying to pop up a screen from OE10.3 detail line that will total prices from a custom table and pass that total back to OE10.3 detail line price field. Is this possible? I'm thinking that there has to be a global variable, or some shared memory trick.
    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      Can you define your custom table in Lawson dbdef and use a DME call to get the data you want?
      David Williams
      Todd
      Basic Member
      Posts: 7
      Basic Member
        Yes I can create the table and the DME call. Just need guidance with passing variables between forms.
        Ragu Raghavan
        Veteran Member
        Posts: 476
        Veteran Member
          Do you want the pop up to display something to the users ? or just to do the totals ?

          If just to do the totals, you do not need the pop-up.

          Wtite a function that does a DME call, Loop thru the XML return and sum up the values
          Paint a button and assign the function to this button.
          Todd
          Basic Member
          Posts: 7
          Basic Member
            I want the totals passed back so I can add that to the price of the COLINE. Want the pop up so they can see what is being added into the price.
            Ragu Raghavan
            Veteran Member
            Posts: 476
            Veteran Member
              A simple alert will not do ?

              alert("New amount " + vCustomTotals + " addded to line cost");
              Todd
              Basic Member
              Posts: 7
              Basic Member
                Maybe I'm not making my point very clear. I want to pass values from one DS screen to another. What's the best way to do that? Is there global variables or something in shared memory. I use the CRT-CONTROL variables to accomplish this in COBOL.
                Terry P
                Veteran Member
                Posts: 234
                Veteran Member
                  Need more information. Are the two "screens" custom Portal Pages or Forms? You only mentioned OE10.3 and no second screen.

                  If Forms, are they the default presentation so they can be called from the search field, or are they called by bookmarks?
                  Todd
                  Basic Member
                  Posts: 7
                  Basic Member
                    Two forms. Using COBOL I can transfer from one screen to another had send variables threw the CRT-CONTROL variables, and also key numbers. I want to accomplish the same thing but using java script in DS, and not mess with any 4GL code.


                    Terry P
                    Veteran Member
                    Posts: 234
                    Veteran Member
                      Todd - you need to be more specific. What two forms are we talking about here??? And how are they called?
                      Todd
                      Basic Member
                      Posts: 7
                      Basic Member
                        It does not matter. Click on a 'Comments' button on any screen, and it takes you to another form. On that form you hit the 'Back' button which takes you right back to the original form. Just want some variable from the 'Comments' form to be available to me on the original form.

                        In another topic you guys talking about shelling out to the command line in DS. How did you pass parameters or variables to that?
                        Terry P
                        Veteran Member
                        Posts: 234
                        Veteran Member
                          Well sorry to say it DOES matter. Especially now you mention comments. In Lawson, "comments" are not handled the way you might think. They are stored as attachments and are not displayed using a normal form, but rather thru IDA (interactive drill around) calls. There is no "comments form" per say.

                          So, if you tell us a little more about exactly what you're trying to do - maybe some of us can assist you. But I'm still in a fog about what you're trying to do, so I don't know the best method to tell you.
                          Todd
                          Basic Member
                          Posts: 7
                          Basic Member
                            OE10.3 is going to have a new button that will take the user to a new screen where they will be allowed to select 'features' of items (new table). Want to total up the price of the 'features' and add it back into the COLINE.PRICE. Want to push the total back to OE10.3. Not duplicate DME calls in both forms.

                            Terry P
                            Veteran Member
                            Posts: 234
                            Veteran Member
                              Not sure if this will work - but here is how I pass from one form to another. It's different than what you are trying to do though. Is the "new screen" a customized Lawson form done with Design Studio, or a non-Lawson form?

                              Here is the code in the calling program:

                               

                              This is in the called program:
                              [CODE] //********************************************************************************* function FORM_OnInit() { lawForm.setFormValue("text83",vPath); x = window.location.search y1 = x.indexOf("V:") y2 = x.indexOf("I:") y3 = x.indexOf("||host") vVendor = x.substr(y1+2,y2-y1-2) vVendor = lTrim(vVendor) vInvoice = x.substr(y2+2,y3-y2-2) return true; }


                              If they were Portal Pages, you could use the PortalStorage() function