PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 2/12/2022 10:18 PM by  Ragu Raghavan
portalWnd.DataStorage not working
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
TBonney
Private
Private
Veteran Member
(640 points)
Veteran Member
Posts:276


Send Message:

--
2/11/2022 9:23 PM

    We recently migrated a DS form for PO20 that was created in portal version 9.0 to new environment that is version 10.11. After using the migration tool, it still doesn't work. The tool told us the following:

    inspecting script: /content/forms/po20.1_custom_tdbnew.xml
    - Processing XML nodes using "selectSingleNode()" in combination with ".text" may not work in all situations. Use the "DataStorage" object documented in the Object Viewer of Design Studio. - occurrences found: 9
    - Use the global "portalWnd.cmnDlg.messageBox(msg)" instead of "alert(msg)" - Reference the Object Viewer of Design Studio for details - occurrences found: 4

    We got the message boxes working, but were unable to find anything on any data storage object documention anywhere in the Object Viewer of Design Studio, nor find anythign useful anywhere else on the proper syntax for its usage.

    The issue is that the form just hangs. We have confirmed that the AGS call is working, but the subsequent useage of the data storage object to populate the desired field with data elements returned from the call is failing.

    Can anybody advise on the proper syntax to use this data storage object? Thank you in advance.

    Following is the block of code fomr the script that is failing:

    //window.open(sAGSCall);
         var sAGSInfo = portalWnd.httpRequest(sAGSCall);
         if (formState.agsError) return;
        //portalWnd.cmnDlg.messageBox("Displaying Test Message 1"
        ////////// portalWnd.cmnDlg.messageBox("text" DISPLAYS WORK UP TO THIS POINT! ///////////
        //THIS WORKS: portalWnd.cmnDlg.messageBox(sAGSCall)
        //AND SINCE WE GET A MESSAGE TO DISPLAY AFTER THE AGS ERROR EVALUATION, WE KNOW (OR AT LEAST BELIEVE) THE AGS CALL IS IN FACT WORKING WITHOUT ERROR!!

        //var sAcctNum = sAGSInfo.selectSingleNode("//VLO-VEND-ACCT".text;
        var sAcctNum = sAGSInfo.portalWnd.DataStorage("//VLO-VEND-ACCT".text;
              
                 if (!sAGSInfo || sAGSInfo.status > 400)
                 {
                    portalWnd.cmnDlg.messageBox("Page Not Found"
                     return;
                 }

                //var sFldNbr = sAGSInfo.selectSingleNode("//FldNbr".text;
                var sFldNbr = sAGSInfo.portalWnd.DataStorage("//FldNbr";
                  //var sMsgNbr = sAGSInfo.selectSingleNode("//MsgNbr".text;
                  var sMsgNbr = sAGSInfo.portalWnd.DataStorage("//MsgNbr";
                //var sMessage = sAGSInfo.selectSingleNode("//Message".text;
                var sMessage = sAGSInfo.portalWnd.DataStorage("//Message";
           
            if (sMsgNbr > "000"
            {
                portalWnd.cmnDlg.messageBox(sFldNbr + ", " + sMessage + ", " + sMsgNbr)
                        return;
            }
                   lawForm.setFormValue("text43",sAcctNum);

    Ragu Raghavan
    Private
    Private
    Veteran Member
    (1300 points)
    Veteran Member
    Posts:452


    Send Message:

    --
    2/12/2022 1:12 AM
    As part of the move from 9.x to 10.x, did you also have to move from IE to Chrome?
    TBonney
    Private
    Private
    Veteran Member
    (640 points)
    Veteran Member
    Posts:276


    Send Message:

    --
    2/12/2022 9:00 PM

    We wnet form 9.01 to 10 in 2018 and used IE10 since. Our newest migration was form 10.05 to 10.11 and at this time we are moving to Chrome. With the versions we'll be on and the servers/databases we'll b using, I believe it has to be Chrome or Edge, but am not positive.

    Ragu Raghavan
    Private
    Private
    Veteran Member
    (1300 points)
    Veteran Member
    Posts:452


    Send Message:

    --
    2/12/2022 10:18 PM
    You are not authorized to post a reply.