Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing field without alias
Message
From
30/10/1998 12:14:48
 
 
To
30/10/1998 12:06:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00152877
Message ID:
00152888
Views:
23
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform