Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Obtains the next value of the specified MUMPS global and subscripts.

Arguments

ArgumentData TypeRequiredDescription
globalNamestringYesThe name of the global to examine
subscriptsarrayYesAn array of subscripts. May be empty to examine the root node of the global.

Return Value

mumps.order() returns a struct with the following members:

  • value: A string representing the next value of the specified MUMPS global and optional subscripts.
  • lastResult: A boolean value indicating whether or not the traversal of the specified global and optional subscripts has finished.

Example

This example returns a list of account names, presuming the IGLS accounting package is installed on the host.

 

CFML
<cfset mumps = createObject("component", "lib.cfmumps.mumps")>
<cfset mumps.open()>
<ul>
<cfset lastResult = false>
<cfset nextSubscript = "">
<cfloop condition="lastResult EQ false">
  <cfset order = mumps.order("TT", ["ACCT", nextSubscript])>
  <cfset lastResult = order.lastResult>
  <cfset nextSubscript = order.value>
  <cfoutput>
    <cfif nextSubscript NEQ "">
      <li>#mumps.get("TT", ["ACCT", nextSubscript])#</li>
    </cfif>
  </cfoutput>
</cfloop>
</ul>
<cfset mumps.close()>
  • No labels