Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String Contained in Field Name
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00575887
Message ID:
00575906
Vues:
21
>I am trying to come up with a quick, effecient way of issuing a BROWSE... from the command window where I brow fields containing "xx" in their fieldname. For example, I want to browse all the fields in a table that have a "PD" in their fieldname. So I would browse MedPD, SurgPD but not browse FeeKey.
>
>Any suggestions?
Function BrowseParticularFields
lparameter tcPattern
local lnFields, lnI, lcStr, lnFields
lcStr=''
if empty(m.tcPattern)
   tcPattern = "PD"
endif
lnFields=afields(laFields)
for lnI = 1 to 
    if m.tcPattern $ laFields[m.lnI,1]
       lcStr = m.lcStr+laFields[m.lnI,1]+','
    endif
endfor
if !empty(m.lcStr)
    lcStr = "fields "+left(m.lcStr,len(m.lcStr)-1))
endif
browse &lcStr
This is off the top of my head and not tested.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform