READVAR()
Contents
READVAR()
Class
Screen Forms
Purpose
Function to name the @...GET variable being processed by a READ
Syntax
READVAR([<expN>])
See Also
@...GET, DEFINE TABLE, RECNO(), PARAMETER, SET VALIDATE
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 Mirage Server, Recital Terminal Developer