Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro Substitution Fails
Message
From
18/03/2003 15:30:32
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Macro Substitution Fails
Miscellaneous
Thread ID:
00767234
Message ID:
00767234
Views:
41
I want to dynamically send the value from a field to a function where the fieldname may change depending on different conditions. For instance, if the table is al3dict.dbf and the field value I want to pass is al3dict.prof_sc which contains the character string mdr_dob, I try:
*Original Code Works Correctly
value1=WORDHIDE('prof_sc')
?value1  && returns 'mdr_dob' which is value in prof_sc field in table

*New code using macro substitution does not work, why?
getfield='prof_sc'
value1 = WORDHIDE(&getfield)
?value1
WORDHIDE should return the string 'mdr_dob' but in fact it doesn't appear that the wordhide program is running at all once I use macro substitution. I placed a 'set step on' in the top of the wordhide program and it never hits it. I have deleted all .bak and .fxp versions of the wordhide program to ensure that it could not be attempting to run an older version.

Any ideas?
TIA!
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Next
Reply
Map
View

Click here to load this message in the networking platform