AndrewMozley
Programmer
I have an application which has a PARAMETER table in which I save several interesting “System constants” which the user may set and which determine some aspects of the running of the system
The structure of the table in slightly simplified form is that there is a Code field, a Description field and a Data field. So I might have
Some of these are “one-off” items, as for example the name of the company, but some occur in groups - for example the user might decide to have identifying prefixes for several sorts of documents, or the system might need to know what codes are used for several control accounts in the accounting nominal ledger.
I had therefore thought of including in the table a 2-character code, “Group” which could be used to group together all the VAT codes and all the control accounts &c
So in this case the unique identifier of a record would be the combination of the “Group” and the “Code”.
My slight problem is that composite indexes do not appear to be encouraged in VFP. I have been considering various solutions, like including a separate field “Group_Code” which would be that unique key, but then I would need to populate that field when I add a new record - I could not define it as a bound control (not even as a disabled or hidden bound control)
Grateful for any ideas.
The structure of the table in slightly simplified form is that there is a Code field, a Description field and a Data field. So I might have
Code.......Desc..................................Data
SYSCO....Name of the company.........The Arms Trading Company
INVPRE...Prefix for sales invoices.......IN
VAT1.......Standard VAT rate.............20.0%
SYSCO....Name of the company.........The Arms Trading Company
INVPRE...Prefix for sales invoices.......IN
VAT1.......Standard VAT rate.............20.0%
Some of these are “one-off” items, as for example the name of the company, but some occur in groups - for example the user might decide to have identifying prefixes for several sorts of documents, or the system might need to know what codes are used for several control accounts in the accounting nominal ledger.
I had therefore thought of including in the table a 2-character code, “Group” which could be used to group together all the VAT codes and all the control accounts &c
So in this case the unique identifier of a record would be the combination of the “Group” and the “Code”.
My slight problem is that composite indexes do not appear to be encouraged in VFP. I have been considering various solutions, like including a separate field “Group_Code” which would be that unique key, but then I would need to populate that field when I add a new record - I could not define it as a bound control (not even as a disabled or hidden bound control)
Grateful for any ideas.