General information
Category:
Coding, syntax & commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only