Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get field value from unknown table name
Message
From
09/03/2006 05:06:42
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01102668
Message ID:
01102685
Views:
10
>Hi everybody,
>
>Assuming I have a table (view) open in a datasession with unknown alias, is there a simple way of finding the value of a field from that table?
>
>In other words, I have, say, 20 tables or views (CAs) open in the DS. One of the tables has cClient_Account_Number field, that I'd like to get a value from. It's not 100% guarantee, that the table, containing this field, is currently opened in this datasession. But if the table (or view) with this field is opened, I'd like to get the value from the current record.
>
>What is the easiest way to get this info? I can think of looping through aUsed array and checking type["Alias.field_name"].
>
>Thanks in advance.

Use FSIZE()

Do you known the alias dbf ?
if yes
if AUSED(aalias,dbfname)>0
  ...=EVAL(m.aalias + '.field_name')
endif
Previous
Reply
Map
View

Click here to load this message in the networking platform