Difference between revisions of "ORDER()"

From Lianjapedia
Jump to: navigation, search
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Function to return the currently selected master index number
+
Function to return the name of the currently selected master index
 
+
  
 
==Syntax==
 
==Syntax==
 
ORDER([<workarea | alias>])
 
ORDER([<workarea | alias>])
 
  
 
==See Also==
 
==See Also==
[[CLOSE INDEX]], [[FIND]], [[IFILECOUNT()]], [[INDEX]], [[INDEXKEY()]], [[KEY()]], [[LOOKUP()]], [[NDX()]], [[REINDEX]], [[RLOOKUP()]], [[SEEK]], [[SET CACHELOAD]], [[SET DCACHE]], [[SET ICACHE]], [[SET INDEX]], [[SET ORDER]], [[SYS()]]
+
[[CLOSE INDEX]], [[IFILECOUNT()]], [[INDEX]], [[INDEXKEY()]], [[KEY()]], [[LOOKUP()]], [[NDX()]], [[REINDEX]], [[RLOOKUP()]], [[SEEK]], [[SET INDEX]], [[SET ORDER]], [[SYS()]]
 
+
  
 
==Description==
 
==Description==
The ORDER() function returns the currently selected master index number as specified with the SET ORDER TO command.  If no index files are active, it returns -1.
+
The ORDER() function returns the name of the currently selected master index: single index file basename or tag tagname.  If no master index is active, it returns an empty string.
  
 
If the workarea number or alias name <workarea | alias> is specified, then the function will operate in the required location.
 
If the workarea number or alias name <workarea | alias> is specified, then the function will operate in the required location.
 
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
use patrons index name, event
+
open database southwind
 +
use customers
 +
set order tag companyname_search
 
? order()
 
? order()
        1
+
companyname_search
set order to 2
+
? order()
+
        2
+
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Indexing]]
+
[[Category:Cursor Functions]]
[[Category:Indexing Functions]]
+
[[Category:Search Functions]]

Latest revision as of 08:28, 30 May 2013

Purpose

Function to return the name of the currently selected master index

Syntax

ORDER([<workarea | alias>])

See Also

CLOSE INDEX, IFILECOUNT(), INDEX, INDEXKEY(), KEY(), LOOKUP(), NDX(), REINDEX, RLOOKUP(), SEEK, SET INDEX, SET ORDER, SYS()

Description

The ORDER() function returns the name of the currently selected master index: single index file basename or tag tagname. If no master index is active, it returns an empty string.

If the workarea number or alias name <workarea | alias> is specified, then the function will operate in the required location.

Example

open database southwind
use customers
set order tag companyname_search
? order()
companyname_search