Valid Routine to Convert Character Data to LowercaseLast reviewed: April 30, 1996Article ID: Q111920 |
The information in this article applies to:
SUMMARYBy using the generic code snippet shown below, you can change input data to all lowercase.
MORE INFORMATIONBy using the following generic code snippet, you can change input data to all lowercase. It is very simple to change memory variables, but changing database fields takes more code manipulation. In this example, there is only one database open and any number of variables with different names other than the database's field names. The Screen Generator is also used for this example. In the SETUP snippet of the screen, type the following code:
*** Puts all of the database fields into an array called mydata =AFIELDS(mydata)In the VALID snippet of any character field, type the following generic code:
*** List of Variables and Definitions *** *** curfield - the current field or memory variable *** *** newval - The new value converted to lowercase *** *** BEGIN CODE HERE *** curfield=VARREAD() newval=LOWER(EVALUATE(curfield)) ** IF...ENDIF to determine if it's a field name or memory variable IF ASCAN(mydata,curfield)>0 REPLACE &curfield WITH newval && database field ELSE STORE newval TO &curfield && memory variable ENDIF SHOW GET &curfield && refreshes only the current GET *** END CODE *** |
Additional reference words: FoxMac FoxDos FoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |