Difference between revisions of "READVAR()"

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 name the @...GET variable being processed by a READ
 
Function to name the @...GET variable being processed by a READ
Line 12: Line 8:
  
 
==See Also==
 
==See Also==
[[@...GET]], [[DEFINE TABLE]], [[GETNO()]], [[PARAMETERS]], [[READ]], [[RECNO()]], [[SET FIELDVAL]], [[SET VALIDATE]]
+
[[@...GET]], [[DEFINE TABLE]], [[GETNO()]], [[PARAMETERS]], [[READ]], [[RECNO()]], [[SET FIELDVAL]], [[SET VALIDATE]], [[VARREAD()]]
  
  
Line 18: Line 14:
 
The READVAR() function returns the name of the current @...GET variable being processed by a READ command.  The name of the variable is returned as an uppercase string.  When used with table fields, the READVAR() function returns a blank when the table field is displayed, and the table name when it is activated.  The READVAR() function can also be used to return the <variable> of the current MENU TO <variable> command.
 
The READVAR() function returns the name of the current @...GET variable being processed by a READ command.  The name of the variable is returned as an uppercase string.  When used with table fields, the READVAR() function returns a blank when the table field is displayed, and the table name when it is activated.  The READVAR() function can also be used to return the <variable> of the current MENU TO <variable> command.
  
If the optional <expN> is specified and is greater than zero (0) and if the current @…GET being processed is an object property, then the name of that object will be returned.
+
If the optional <expN> is specified and is greater than zero (0) and if the current @...GET being processed is an object property, then the name of that object will be returned.
  
  
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]]
 
[[Category:Screen Forms Functions]]
 
[[Category:Screen Forms Functions]]

Latest revision as of 15:10, 7 December 2009

Purpose

Function to name the @...GET variable being processed by a READ


Syntax

READVAR([<expN>])


See Also

@...GET, DEFINE TABLE, GETNO(), PARAMETERS, READ, RECNO(), SET FIELDVAL, SET VALIDATE, VARREAD()


Description

The READVAR() function returns the name of the current @...GET variable being processed by a READ command. The name of the variable is returned as an uppercase string. When used with table fields, the READVAR() function returns a blank when the table field is displayed, and the table name when it is activated. The READVAR() function can also be used to return the <variable> of the current MENU TO <variable> command.

If the optional <expN> is specified and is greater than zero (0) and if the current @...GET being processed is an object property, then the name of that object will be returned.


Example

// Pop-up choice list called from a field validation
procedure choices
  parameters m_input
  // If the help key is pressed
  if lastkey()=ctrl('c')
      m_exp = iif(readvar()="ACC_NO","account","supplier")
      select codes
      save screen
      set message to "Select code, press  ^C to abandon."
      menu browse &m_exp at 5,30 to 15,40;
        quit;
        clear
      restore screen
      // If a selection was made
      if not empty(menuitem()) 
          set fieldval to left(menuitem(),3)
          set validate on
      endif
      select accounts
  endif
return


Products

Recital