Difference between revisions of "CANDIDATE()"

From Recital Documentation Wiki
Jump to: navigation, search
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
==Class==
 
Indexing
 
 
 
 
==Purpose==
 
==Purpose==
 
Function to determine whether an index tag is a candidate index tag.
 
Function to determine whether an index tag is a candidate index tag.
Line 16: Line 12:
  
 
==Description==
 
==Description==
The CANDIDATE() function is used to determine whether an index tag is a candidate index tag.  The number of the index tag to be examined can optionally be specified in <expN1>.  If <expN> is not specified, the CANDIDATE() function will operate on the master index tag of the currently active table.  If the tag number, <expN>, is specified, the CANDIDATE() function can be used on tables other than the currently active table by specifying either the relevant workarea number, <expN2>, or the alias name of the table, <expC>.
+
The CANDIDATE() function is used to determine whether an index tag is a candidate index tag.  The number of the index tag to be examined can optionally be specified in <expN1>.  If <expN1> is not specified, the CANDIDATE() function will operate on the master index tag of the currently active table.  If the tag number, <expN1>, is specified, the CANDIDATE() function can be used on tables other than the currently active table by specifying either the relevant workarea number, <expN2>, or the alias name of the table, <expC>.
  
 
NOTE: A candidate index tag is an index tag that is a likely candidate to become the primary index tag as it does not contain any null or duplicate values.
 
NOTE: A candidate index tag is an index tag that is a likely candidate to become the primary index tag as it does not contain any null or duplicate values.
Line 25: Line 21:
 
if tagcount() > 0
 
if tagcount() > 0
 
     for i = 1 to tagcount()
 
     for i = 1 to tagcount()
         ? "Candidate status for " + tag() + " is " + ltos(candidate(i))
+
         ? "Candidate status for " + tag(i) + " is " + ltos(candidate(i))
 
     next
 
     next
 
endif
 
endif
Line 32: Line 28:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Indexing]]
 
[[Category:Indexing]]
 
[[Category:Indexing Functions]]
 
[[Category:Indexing Functions]]

Latest revision as of 09:19, 25 June 2019

Purpose

Function to determine whether an index tag is a candidate index tag.


Syntax

CANDIDATE([<expN1>][,<expN2> | <expC>])


See Also

ALIAS(), INDEX, Optimizing Indexes using SYNCNUM, SELECT(), SEQNO(), SYNCNUM, TAG(), TAGCOUNT(), TAGNO(), UNIQUE()


Description

The CANDIDATE() function is used to determine whether an index tag is a candidate index tag. The number of the index tag to be examined can optionally be specified in <expN1>. If <expN1> is not specified, the CANDIDATE() function will operate on the master index tag of the currently active table. If the tag number, <expN1>, is specified, the CANDIDATE() function can be used on tables other than the currently active table by specifying either the relevant workarea number, <expN2>, or the alias name of the table, <expC>.

NOTE: A candidate index tag is an index tag that is a likely candidate to become the primary index tag as it does not contain any null or duplicate values.


Example

if tagcount() > 0
    for i = 1 to tagcount()
        ? "Candidate status for " + tag(i) + " is " + ltos(candidate(i))
    next
endif


Products

Recital Server, Recital