How can I update a table eg. orders table from another table’s records. eg. products.
I want to pull in data from products.an item which was ordered by a client
Secondly. On another application how cam I add an auto numbering field to an existing database.
You just fetch() the appropriate row from the table and assign the fields. If it’s on a form and you’re using an entry field for the product code have a look at the actions for the control.
The autonumbering done by clarion is contrlled by a key. Just define a key with the fields needed
Hi Sean
I checked out the autonumbering in clarion and noticed that it only works in new records that are added to the database. I am asking if there is a way to add autonumbering numbers to existing data.
you may need to number the new field yourself on the existing records. Do you have FM3? I think it allows you to set SetIfNew to AutoNumber for tps files etc.
To prime an autonumber field
AutoUP can automatically prime a new autonumber field for you. It will start at 1 and increment by 1 for each record.
Property Clarion 8 Property Description Value
SetIfNew Default value of the field when added to the table AutoNumber Note: SetIfNew AutoNumber is not supported in SQL. Check out AutoNumber (https://www.capesoft.com/docs/fm3/fm3.htm#duoAutoNumber) in the Dictionary User Options for more details.
For existing data you will need to create a procedure to alter the existing data.
I assume you mean you want to add a new field that you want to autonumber?
If so, and since you’re using TPS you will need to create a conversion program anyway. Assuming you use ABC methods, the copy from the old to the new converted file layout will autonumber for you.
That effectively what FM3 does as well.