Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing field without alias
Message
De
30/10/1998 12:14:48
 
 
À
30/10/1998 12:06:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00152877
Message ID:
00152888
Vues:
24
>Is there a way to reference a field without specifiying the currently selected alias, something in the flavor of m.Fieldname? I think I've seen this in old Dbase code, just don't know if there is a way to do it in VFP.

You can refer to a field without using the alias, as long as the work area that it is in is the current work area... for example...

select 1
use thisview

x = thisview.thisfield && works

x = thisfield && works

If you want to have a different current work area and refer to the field you have to use the alis. If you only want the value, you can scatter the record to memvars and refer to / modify the mem vars... You have to make sure that you have no duplicate field names...


select 1
use thisview
scatter memvars

select 2

cOldVal = m.ThisField
m.ThisField = cNewVal

select 1
gather from memvars


Of course, it uses Privates.

BOb
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform