Difference between revisions of "GETNO()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Class==
 
Screen Forms
 
 
 
 
==Purpose==
 
==Purpose==
 
Function to return the number of the current GET
 
Function to return the number of the current GET
Line 12: Line 8:
  
 
==See Also==
 
==See Also==
[[@...GET]]
+
[[@...GET]], [[READ]], [[READVAR()]]
  
  
Line 22: Line 18:
 
<code lang="recital">
 
<code lang="recital">
 
function chk_country
 
function chk_country
if getno() = 1
+
  if getno() = 1
    do case
+
      do case
    case country = "USA"
+
      case country = "USA"
        // Move to the state field
+
          // Move to the state field
        m_return = 2
+
          m_return = 2
    case country = "CANADA"
+
      case country = "CANADA"
        // Move to the province field
+
          // Move to the province field
        m_return = 4
+
          m_return = 4
    otherwise
+
      otherwise
        dialog box "INVALID COUNTRY"
+
          dialog box "INVALID COUNTRY"
        m_return = .F.
+
          m_return = .F.
    endcase
+
      endcase
else
+
  else
    dialog box "ERROR"
+
      dialog box "ERROR"
endif
+
  endif
 
return m_return
 
return m_return
  
Line 48: Line 44:
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Screen Forms]]
 +
[[Category:Screen Forms Functions]]

Latest revision as of 16:08, 2 December 2009

Purpose

Function to return the number of the current GET


Syntax

GETNO()


See Also

@...GET, READ, READVAR()


Description

The GETNO() function returns the number of the currently active GET. You may use a function which returns a number with the VALID option of the @...GET command to activate a specific GET for selective processing in a form. The GETNO() function returns a numeric data type value.


Example

function chk_country
  if getno() = 1
      do case
      case country = "USA"
          // Move to the state field
          m_return = 2
      case country = "CANADA"
          // Move to the province field
          m_return = 4
      otherwise
          dialog box "INVALID COUNTRY"
          m_return = .F.
      endcase
  else
      dialog box "ERROR"
  endif
return m_return
 
@02,10 get country valid chk_country()
@03,10 get state
@04,10 get zip
@05,10 get province
read


Products

Recital