Business Objects in Visual Builder need to have a primary key field that will be used for identifying a specific record. To make life easy, VB creates an ID field for you in each new business object that you create. This ID field is automatically maintained by VB, with unique values populated in new records coming from a DB-sequence that VB manages in the database.
There are however situations when you might want to use an alternative field's value as the identifying value for a row. This is a common in situations where the data for the business object is imported from another system. Usually the "other system" already has a field that uniquely identifies the row, and you might want to use that field as the id in the VB system too. For example if you need to synchronize updates to the record in the VB system based on changes in the "other system".
With version 2204 of Visual Builder you can create a business object with an alternative key field. To do that create the business object from file using the data manager's -> create BO from file option. In the file that you import you can have another numeric field that you then set as the new key field as part of the initial import of data. VB will use that field as the new unique id for any additional rows you'll create in the BO. VB will create a DB-sequence that will be used for populating the value for new rows. (The value in the sequence starts from the max value of an id in the data you imported). Note that this means that any new records that you'll add will not be importing the key from the external system but rather getting a new value assigned to them by VB (unless you replace the existing records doing a new import operation).
In the demo video below we show you how to create a new BO with an alternative key and how that new key can be used in future query and update operations.
Another solution for this requirement is to not rely on VB to manage your database tables, but rather use an external database into which you import data and define the key as you like for the tables there. Then you can still use business objects to rest enables the tables for easy consumption in Oracle Visual Builder.
