4D v15

Subrecords conversion

Home

 
4D v15
Subrecords conversion

Subrecords conversion  


 

 

Originally introduced in 4D v14 R3

You can now assign the value of the "id_added_by_converter" special field that is automatically added by 4D when converting a database from a version prior to v11. In previous releases, this value could only be assigned by 4D, and you needed to use "deprecated" commands such as _o_CREATE SUBRECORD to be able to add new records in converted subtables.

This new feature allows you to convert your old databases that use subtables in a more progressive way: you can keep the special "subtable relation" link, and add or modify related records as if they were standard. Once all your methods have been updated, you will be able to replace the special relation with a regular one with no change in your code.

For example, you can now write:

 CREATE RECORD([Employees])
 [Employees]Last Name:="Jones"
 CREATE RECORD([Employees_Children])
 [Employees_Children]First Name:="Natasha"
 [Employees_Children]Birthday:=!12/24/2013!
 [Employees_Children]id_added_by_converter:=4 //Type mismatch in previous releases
 SAVE RECORD([Employees_Children])
 SAVE RECORD([Employees]

This code will work with both special and regular relations.

 
PROPERTIES 

Product: 4D
Theme: Language

 
HISTORY 

 
ARTICLE USAGE

4D v15 - Upgrade (standard edition) ( 4D v15)