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 }