4D v16Importing |
||
|
4D v16
Importing
Importing
In addition to the manipulations explained in the video, you should also note that: When importing Boolean values (True-False in 4D), you can request an automatic conversion:
4D automatically converts the imported data (the first value to True and the second to False). You can also provide users with access to the import or export dialog box using the following commands:
When you perform an import using a form, the form contains the fields receiving the data. The entry order of the form must be the same as the order of the columns in the import file. In this video, we'll learn how to create a table directly when importing data. We have already imported data into the Interventions and Technicians table. To save time and quickly retrieve existing information already entered in another database or in a spreadsheet, we are going to see how to create a table directly when importing data from a tab-delimited text file. We'll perform an import like we did in previous videos.
The import settings dialog box appears:
Fields are then created automatically and typed by default according to their contents. Back on the 1st tab, we can still run into problems with accents so let's change the file and then we can indicate which type of field we want to set for each column.
Once these settings are made, click on the "Import" button. The data is imported and then 4D offers to create forms for this new table. As we have done so far, we click on Yes. There are other ways of importing available in 4D:
Using this same Import dialog box, File => Import => From File, you can import data using a form. We are going to simulate this without actually going through with it. For example, in the places.txt file, we can import data using a form. The idea is to create a specific form, dedicated to importing data where we have programmed object methods or the form method itself so that they perform automatic checking, reformatting or automatic filling in of calculated fields, etc. just as if the user was entering data directly in this form. Later on in the programming, we can carry out imports using the Open document and RECEIVE PACKET commands, which we will see in another video.
|
PROPERTIES
Product: 4D
HISTORY
ARTICLE USAGE
Self-training ( 4D v16) |