Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Fields, but don't know the name
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00669125
Message ID:
00669135
Views:
16
This message has been marked as the solution to the initial question of the thread.
LOCAL lnCt, jnX, laFldList

DIMENSION laFldList(1)

ACTIVATE SCREEN
CLEAR
? "Fields in current record having a value of 12:"

* Field types: 
* C = Character 
*D = Date
*				 L = Logical
*				 M = Memo
*				 N = Numeric
*				 F = Float
*				 I = Integer
*				 B = Double
*				 Y = Currency
*				 T = DateTime
*				 G = General


lnCt=AFIELDS(laFldList)
IF lnCt > 0
	FOR jnX = 1 TO lnCt

		IF INLIST(laFldList(jnX,2),"N","B","Y","I","F")  && all numeric data types
			IF EVALUATE(laFldList(jnX,1)) = 12

				? CHR(9) + laFldList(jnX,1) && identify field names where contents = 12

			ENDIF && EVALUATE(laFldList(jnX,1)) = 12
		ENDIF && INLIST(laFldList(jnX,2),"N","B","Y","I","F")

	ENDFOR && jnX

ENDIF && lnCt > 0


RELEASE lnCt, jnX, laFldList
David Martin
Previous
Reply
Map
View

Click here to load this message in the networking platform