Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing a field with an unknown name
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00086557
Message ID:
00086626
Views:
21
>fld = "cpp."+alltrim(trips.dwn_region)
>trips.copay = fld

Suggestions:
- say: Replace Trips.Copay with Eval(fld)
- You can do some helpful things with SQL statements. For example, you can build your entire UI off of a table with known (or systematically generated) field names. You would populate this table (or cursor) with a dynamically generated SQL statement that essentially remaps "unknown" fields (or generates entire new fields from combinations of "unknown" fields) from your universe of all field names.
- You can dynamically set the controlsource for each column in a gird, so that the grid maps onto your fields of interest. You can also dynamically set the # of columns in a grid.
- VFP's GenXTab utilitity might be helpful along the way.
- If the need arises, you can use name substitution as follows:
--For memory variables: Store Some_Expression to (cMvName)
--For fields: Replace (cFieldName) with Some_Expression
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform