Discussion:
Table field
(too old to reply)
Marc
2008-06-13 03:55:54 UTC
Permalink
Hi
I have a table named "Documents". This table has a field named "Address". If
I need a record of address I can command "Documents.Address" then it
displays current record pointer Address data. But if I want to get data by
using a variable then how to do.
lcField = "Address"
lcData = Documents.lcField
This line returns an error.
Stefan Wuebbe
2008-06-13 05:45:17 UTC
Permalink
Post by Marc
Hi
I have a table named "Documents". This table has a field named "Address". If
I need a record of address I can command "Documents.Address" then it
displays current record pointer Address data. But if I want to get data by
using a variable then how to do.
lcField = "Address"
lcData = Documents.lcField
This line returns an error.
lcData = documents.address
&& Eval()
lcField = "Address"
lcData = Evaluate("documents." + m.lcField)
&& or Eval() w/o alias
Select documents
lcData = Evaluate(m.lcField)
&& or macro substitution
lcData = &lcField.



hth
-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
RGBean
2008-06-13 22:13:50 UTC
Permalink
Or:
lcField = "Address"
lcData = Documents.&lcField

Rick
Post by Marc
Hi
I have a table named "Documents". This table has a field named "Address".
If I need a record of address I can command "Documents.Address" then it
displays current record pointer Address data. But if I want to get data by
using a variable then how to do.
lcField = "Address"
lcData = Documents.lcField
This line returns an error.
Jeroen van Kalken
2008-06-17 23:50:06 UTC
Permalink
On Fri, 13 Jun 2008 09:25:54 +0530, "Marc" <***@abcd.com> wrote:

Or:
STORE ("Documents"+lcField) TO lcData
Post by Marc
Hi
I have a table named "Documents". This table has a field named "Address". If
I need a record of address I can command "Documents.Address" then it
displays current record pointer Address data. But if I want to get data by
using a variable then how to do.
lcField = "Address"
lcData = Documents.lcField
This line returns an error.
Loading...