Chapter Contents

Previous

Next
Text Entry: _getText

Text Entry: _getText



Returns the text of a text entry field


Syntax
Details
Examples

Syntax

CALL NOTIFY (text-field-name, '_getText', string);

Argument Type Description
string
C returns the contents of the field


Details

The _getText method is inherited from the Widget class. It returns the contents of any field including the numeric types NUMLST and FIXEDLST, which can contain strings of numbers.

Note:    It is possible to obtain unexpected results between successive _setText and _getText statements. For example, suppose you sent a _setText method with the value Jelly to a field named TEXT1 that had the validation type ACTION. The next _getText method sent returns the value X and not Jelly. Another problem can occur when you send text in mixed case to a field with the CAPS attribute turned on, and the text displays in uppercase letters. Subtle differences like this can cause programming errors.  [cautionend]

Instead of using this method, you can also use simple SCL statements that assign text to a field or return text stored in a field. For example, if field TEXT1 contains the string hello, the following PUT statement displays TEXT1=hello and the next statement assigns hello to the SCL variable A:

   put text1=;
   a = text1;

However, SCL statements and functions do not work across Frame boundaries. Therefore, if you need to access field contents between two or more Frames, use the appropriate method instead.


Examples


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.