DME In Design Studio %26

Sort:
You are not authorized to post a reply.
Author
Messages
mondrar
Advanced Member
Posts: 35
Advanced Member

    I have three questions. Hope I'm not asking too much:

    I created a javascript in design studio to show the termination reasons on HR11. The snippet below shows the DME:

    1. Can someone tell me why the only reason I was able to successfully pass two paramaters on the SELECT part of the DME was when I used the %26 prior to the next field. It took me some trial and error before I was able to find the %26. What does the %26 trasnlate to in ascii?

    2. The two fields work great, they show the term reasons on every inquiry, but when I use the CONTROL+SHIFT+K to clear all the fields, it does not clear the two new fields. How do I get the CONTROL+SHIFT+K shortcut to clear the two new fields I added?

    3. I am using the FORM_OnAfterTransaction function. When I use the NEXT button rather than INQUIRE it does not clear the two new fields I added. I added the code to clear the fields if the records lengths are 0, and that works fine. Is there some other function that I should be using to clear the fields when someone hits next rather than INQUIRE?

     var vEmp=lawForm.getFormValue("text2");
     var s = portalWnd.DMEPath;

         s += "?TEST="+strPDL;
         s += "&FILE=PERSACTHST";
         s += "&FIELD=REASON_01;REASON_02";
         s += "&SELECT=EMPLOYEE=" + vEmp;
          s += "%26ACTION_CODE=TERMINATE";
         s += "&XCOLS=TRUE";
         s += "&XKEYS=FALSE";
         s += "&XRELS=FALSE";
         s += "&XCOUNT=FALSE";
         s += "&XIDA=FALSE";
          s += "&OUT=XML";

    Ben Coonfield
    Veteran Member
    Posts: 146
    Veteran Member

      I believe that the %26 should be equivalent to an ampersand "&".

      John Henley
      Senior Member
      Posts: 3348
      Senior Member
        1. Not sure why you'd have to explicitly use %26 instead of just &.
        2. CTRL-SHIFT-K clears the fields on the back-end [LID] form; so fields added in Design Studio are only cleared if they are linked a field on the LID form. In your case, it is working correctly, and you will need to code something into perhaps the FORM_BeforeTransaction to clear the fields.
        Thanks for using the LawsonGuru.com forums!
        John
        mondrar
        Advanced Member
        Posts: 35
        Advanced Member

          During my testing I inquired on two employees. When only using the & rather than the %26. The results were as follows:

          1. An employee who had two term reasons, the DME query would not bring back either result.

          2. An employee who had one term reasons, the DME query would retrieve and populate appropriately.

          When the %26 was used instead of the &, the results were as follows:

          1. All results for employee's with one or two term reasons would populate appropriately.

          I verified these results by displaying the xml that was created during the DME, and tested at the address bar. The results were the same. This is why I had to explicity use the %26 rather than just the &.

          Don't ask my why, I just have to code the work arounds.

           

          John Henley
          Senior Member
          Posts: 3348
          Senior Member
            Does your term reason code have an embedded ampersand & ?
            Thanks for using the LawsonGuru.com forums!
            John
            mondrar
            Advanced Member
            Posts: 35
            Advanced Member

              We have several termination reason codes, and no none of them have an embedded &.

              ./RM

              Nick
              Veteran Member
              Posts: 50
              Veteran Member
                I had the same problem with having to use the %26 or %3D instead of standard ASCII. The problem I have now is that it will not return the DME results to the field I specify.
                David Williams
                Veteran Member
                Posts: 1127
                Veteran Member
                  What are you trying to actually do?
                  David Williams
                  You are not authorized to post a reply.