HTML/Javascript DME function for LOGAN

Sort:
You are not authorized to post a reply.
Author
Messages
Roger French
Veteran Member
Posts: 545
Veteran Member
    I'm doing some portal customizations where I need to use the DME() function. I've used it OK before with application productlines with no issues, but I need to use it to query some LOGAN tables.
    I've tried various things within the DME function, but it's not working. It is always bombing out on the data.js function. I've reviewed it several times but haven't figured it out yet.

    Does anyone have an example of a javascript function where it successfully works by querying LOGAN? Do I need to use the object.logan field? Here is a copy of the function I'm trying to use (hey and no laughing too hard ok?)
    Thank you...
    -R

    function GetMMDistInfo(workUnit,field,seq)

    var  logancall = new DMEObject("LOGAN", "WFVARIABLE")
    logancall.out = "JAVASCRIPT"
    logancall.field = "workunit;variable-name;wf-seq-nbr;variable-value"
    logancall.index = "wfvset1"
    logancall.max = "1"
    logancall.xida = true
     logancall.key = workUnit + "=" + field + "=" + seq
    logancall.func = "FinishMMDist()"
       DME(logancall, "jsreturn")
       return FinishMMDist()
    }


    function FinishMMDist()
    {   var fieldvalue
     for(var i=0;i {   var pObj  = self.logancall.record;
       fieldvalue = pObj.variable_value;
    }

    return fieldvalue;
    }

    Will Hoover
    New Member
    Posts: 1
    New Member
      
      function GetMMDistInfo(workUnit,field,seq) { 
      var  logancall = new DMEObject("LOGAN", "WFVARIABLE")
      logancall.out = "JAVASCRIPT"
      logancall.field = "workunit;variable-name;wf-seq-nbr;variable-value"
      logancall.index = "wfvset1"
      logancall.max = "1"
      logancall.xida = true
      logancall.key = workUnit + "=" + field + "=" + seq
      logancall.func = "FinishMMDist()"
      DME(logancall, "jsreturn")
      // you cannot return the results from this function -> return FinishMMDist()
      }
      
      function FinishMMDist() {   
      var record1 = window.jsreturn.record[0];
      // do something with the 1st record
      }
      
      Jeff Pratte
      Basic Member
      Posts: 13
      Basic Member
        I tried:

        function CheckForDupTwo()
        {
        var workUnit = 0;
        var field = 0;
        var seq = 0;
        //function GetMMDistInfo(workUnit,field,seq) { 
        var  logancall = new DMEObject("LOGAN", "WFVARIABLE")
        logancall.out = "JAVASCRIPT"
        logancall.field = "workunit;variable-name;wf-seq-nbr;variable-value"
        logancall.index = "wfvset1"
        logancall.max = "1"
        logancall.xida = true
        logancall.key = workUnit + "=" + field + "=" + seq
        logancall.func = "FinishMMDist()"
        DME(logancall, "jsreturn")
        // you cannot return the results from this function -> return FinishMMDist()
        return thisDup ;
        }

        function FinishMMDist() {   
        var record1 = window.jsreturn.record[0];
        // do something with the 1st record
        alert('jsreturn=' + jsreturn);
        }

        and I got this error message: SCRIPT5009: 'DMEObject' is undefined 

        Can you point me in the direction I should be looking? 

        Thanks, Jeff


        Scott Perrier
        Veteran Member
        Posts: 39
        Veteran Member
          Jeff - the code above only works if you are on LAUA security and using the older dme format prior to environment 8.1. it will need to be tweeked to run the latest DME calls. Out=Javascript is no longer used out=XML or CSV are the 2 choices under the new AGS functions. See the developers guide for AGS calls on the support site. I am going through the very same issue now with my customizations. I have my AGS calls working but need to figure out how to process the xml returned.
          You are not authorized to post a reply.