Johan Broddfelt
/* Comments on code */

Auto increment and look up

Auto Increment Column

I'm used to working with MySQL and have been looking at some other databases as well and my intuition about auto increment numbers are that they are a switch or setting you add on a field and you do not really care what is going on in the background. The native DataFlex database need slightly more attention. That is why I want to spend some extra time showing you the steps.
In the DataDictionary of a table there actually is a setting for Auto Increment. But in DataFlex you also need to create a separate table to keep those values. That is why we create a system table. You can create multiple system tables with different names if you want to separate them for some reason. In that table we add an id column corresponding to our id in the table we want to increment, with the same size.
In the system table we also want to change the Properties on the right df_is_system_file should be set to True.
Now we can go back to our DataDictionary and select our system table and the correct column in the Auto Increment setting. And you are ready to test the Auto Increments. Remember to add all your tables auto increment id's in the system table.

Look Up table

In DataFlex it is very easy to create look up lists in the views. You can use the Web Lookup Wizard and choose the table and columns to display. When you are done the look up list will vi active in all fields that fetch data from the column. This saves you a lot of time during development.

- DataFlex, Auto Increment, Look Up

<< First view Order header detail view >>

Comment

Name
Mail (Not public)
Send mail uppdates on new comments

Comments

0 post found