Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Know only fields not empty in current record
Message
De
09/07/2002 06:02:26
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Know only fields not empty in current record
Divers
Thread ID:
00676504
Message ID:
00676504
Vues:
71
Hi

I have the following program , to know fields numerics in one record that have the value that i call as parameter .
Ex: Do Function1 WITH 12 && return all numeric fields = 12 in current record

Now , i want know all fields not empty in current record , I don´t want see fields empty in current record .
Can you help me , to change the following function ?
Thanks
Function1

PARAMETER nVal

LOCAL lnCt, jnX, laFldList

DIMENSION laFldList(1)

ACTIVATE SCREEN
CLEAR
? "       " + alias()
? "      Fields in current record having a value of :" 
?  nVal

* 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)) = nVal

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

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


Pedro Silva

world is wonderful with your help .

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform