Record list
3.1 Toolbar
3.1.1. Add button
If the table is read-write, the Add button is active. The new entity is immediately created at the bottom of the list, and its primary key and fields with automatic values are immediately calculated and saved. You can immediately start editing the other values.
3.1.2 Delete button
If the table is read-write, you can delete an entity or a selection of entities, contiguous or disjoint. A confirmation message is displayed, followed by a success or error message depending on the result of the deletion (typically a locked entity).
3.1.3 Copy button
Copies the entire contents of the selection to the clipboard in JSON format, with the exception of the Blob and Image fields. Calculated fields are part of the copied text. The 4D __STAMP is also included in the result.
3.1.4 Export button
This function exports all the entities displayed in the window, rather than the manual selection. A dialog allows you to select the export format: field separator, end of line, optional addition of quotation marks around each value. All fields are exported regardless of the columns displayed in the list.
3.1.5 Select all button
Displays all entities in the data class.
3.1.6 Sub-select button
Isolates a manual selection of records/entities.
3.1.7 Search button
Offers a drop-down menu with 3 choices:
- Classic search: the traditional 4D form editor opens.
- ORDA search: an ORDA query is prepared, which you simply complete according to ORDA syntax. It is of course possible to replace “query” by another function, a link, etc.
In the event of incorrect syntax, the request will not be executed.
The query is stored in memory so that it can be corrected without having to re-enter everything.
- Search ORDA in selection
The ORDA query is performed in the selection displayed on the screen.
3.1.8 Apply formula button
Applies to a contiguous or disjoint entity or selection of entities. Applies an ORDA formula using the syntax “Entity.attribute:=”.
3.1.9 View table list button
This button brings the table list back to the foreground.
3.2 Interface
Table/data class windows cascade when opened one after the other or all together. Once a window has been enlarged and/or moved, subsequent windows will stack in the same place, with an offset and the same size. Clicking Shift when opening a window will return it to its default size and location.
To close an ATL window, use the keyboard shortcut Cmd/Ctrl-W.
Table/data class fields are displayed both in the list columns and in the sidebar on the left of the window under the heading “Displayed fields”.
You can hide certain fields by unchecking them, or uncheck everything first and then check only a limited number of fields.
By selecting one of the fields in the sidebar, the corresponding column will be highlighted in yellow, and a horizontal scroll will be performed if necessary to display it in the window.
Column width can be adjusted globally, as well as individually, using the slider at the bottom of the window. In all cases, columns corresponding to Boolean fields are not enlarged.
The columns can of course be moved and sorted.
By default, in order to preserve display performance, object fields are represented by [object] if they contain a value, or by Null otherwise. By checking the “Show objects” option in the side bar, the contents of objects will be displayed.
3.3 Search
In addition to searching via the 4D search editor or an ORDA formula (see 3.1.7), there are other ways to search for data in the ATL.
The Search Picker at the top right of the window works according to the syntax (@value1@) AND (@value2@) AND .... (@valueN@)
You can therefore enter one or more strings to find all entities that contain all these values in text fields or that are equal to these values in numeric fields.
In the example above, no results would have been obtained without checking the “Search on all fields” option, as none of the table's fields are indexed.
By default, only indexed fields are used by Search Picker for performance reasons. If the search doesn't return the results you expect, check this option. By checking “All fields”, the search will be performed on non-indexed and calculated fields.
On the other hand, if many fields are present in the table, the search will be considerably slowed down. There are other search options, such as searching precisely on a field.
To do this, right-click on a column in the list or on a row in the side bar.
A text box lets you enter either an exact value to search for, or a partial string, provided you enter one or two @s yourself. Please note! Unlike Search Picker, spaces are not considered as word separators. The string “Abu Dhabi” will search for cities corresponding exactly to this wording.
On a Boolean field, you can enter one of the strings “True”, “Vrai”, “False” or “Faux” to perform the search.
With the exception of Booleans, right-click search and search picker do not allow you to search for a null or empty value. To do so, use the Search button on the toolbar.
The right-click search allows you to quickly search on a calculated field.
Note that right-click only works if a selection of entities is already present in the list. You cannot search an empty list in this way.
3.3.1 Using the search picker value
If an initial search via the search picker returns too many results, you can select a specific column and then right-click to search only that column. The value entered in the search picker is available for direct selection without having to go through the input dialog.
In the example below, we search for airports located at latitude 57°, but we also obtain those at longitude 57°.
You can immediately right-click on the latitude column and relaunch the search without re-entering the value.
3.4 Navigation
When you need to consult the parent record of a data item, or the records linked to a primary key, in 4D's user mode, you have to copy the primary key and paste it into the search editor of the linked table(s), which is rather tedious and even more restrictive when starting from a selection of entities (we prefer to write a method in this case).
ATL offers a quick and intuitive solution to this question.
3.4.1 Consulting an entity's parent
Right-clicking on an entity's foreign key immediately displays all the parent record's values in grey in the drop-down menu. If you only need to know the name of the parent record, this operation is sufficient.
But you can also open the parent record to modify it or continue browsing to other tables.
Note: the keyboard shortcuts visible in the list of fields are inherent to the content of these fields and should be ignored.
3.4.2 Consulting the parents of several entities
Starting from an entitys selection, right-click + View parent table to obtain a list of all the selection's parents.
3.4.3 Consulting an entity's children
Right-click on an entity's primary key to obtain a list of all the tables and ORDA links that refer to this entity. Simply select one of the links to open a new window containing the selection of linked entities obtained by this link.
In the example below, two links from the Line table arrive in the Airport table, and you have to choose which link to use to view the lines for the selected airport.
3.4.4 Consulting the children of several entities
The same logic applies to a selection of entities: right-click on the primary key of one of the entities and select the chosen link to open a new window containing all the linked records in the selection.
In the example below, we search for all airports in Asian countries, excluding China. We obtain 383 results.
3.4.5 Table navigation and visibility
Link discovery for linked tables takes into account the restriction concerning hidden tables (see 1.3.1) .
Here's an example with the Line table visible :
Parent search from Slot table.
Search for children in the Airport table
Here's the same example with the Line table hidden :
Parent search from Slot table
Search for children in the Airport table
3.4.6 Long-distance navigation
Thanks to ORDA, you can navigate through an infinite number of levels very quickly, chaining together searches for children and parents from a starting selection.
If you already know that you're going to open unnecessary intermediate tables and you don't want to clutter up your screen, you can hold down the shift key and right-click on the Parent or Child link. This will close the original window and open the destination window.
3.5 Editing
List values, with the exception of calculated fields, are modified by double-clicking and then replacing their value in the dialog box.
A new value can be pasted rather than typed.
The Null value is not accepted: a formula must be applied (see 3.1.8).
As soon as the dialog is validated, the value is saved. A success or failure message appears at the top of the screen.
Warning! There are no controls or safeguards concerning the modification of a primary key or a unique value. There is therefore a risk of losing a link with related records, or of creating a duplicate on a single field.
3.5.1 Boolean modification
Boolean fields are represented as checkboxes. Simply check or uncheck the values.
Note: It is possible to right-click on a Boolean column without altering the cell value. However, care must be taken not to click on this type of column by mistake, as the values would be modified immediately.
3.5.2 Modifying an image
Double-click on the cell to open the image area, which can be modified in three ways:
- A simple click on the image opens a file selection box,
- You can also drag and drop an image onto the zone,
- Finally, 4D's native contextual menu is operational,
3.5.3 Modifying an object
Double-clicking on an object field opens a JSON editor that lets you edit the object's content intuitively.
Elements of various types can be inserted, moved or deleted in the object:
- Objects,
- Collections (referred to as Arrays in the JSON editor),
- Keys/Values: text, numeric, Boolean (“true” or “false”).
Decimal values must be entered with a period, not a comma.
It should be noted that, unlike the rest of the ATL, modifications must be validated to be taken into account.
The current object can be made null by clicking on the corresponding button. The editor window is immediately closed and the object is marked Null in the ATL list.
You can also copy or paste an object between two records.
The contents of the object can be printed by right-clicking.
For more details on how the editor works, please refer to https://github.com/josdejong/jsoneditor/
3.5.4 Copying and pasting values
In addition to copying the entire record (see 3.1.3) and copying a value from the input editor (see 3.5), you can also copy the value of a particular cell by right-clicking + Copy.
It is then possible to paste the value into another cell, if the table is not read-only (see 1.3.2 and see 1.3.3).
Note that this action applied to a selection of several lines will only process the last line (see next point).
3.5.5 Copying columns
On a selection of several entities, right-click + Copy Column to paste the sequence of values for the selected field into a text editor or spreadsheet (to calculate a sum, for example).
3.5.6 Copying distinct values
On a selection of several entities, right-click + Distinct values to paste all distinct column values for the selected rows onto the clipboard.
3.6 Refresh
In principle, the values visible in the ATL are those corresponding to the moment the table was opened, or the last action performed (a search, for example).
Without any action on the part of the user, the data may become outdated and incorrect, as well as the link to the related data.
There are several ways to refresh data, either manually or automatically.
3.6.1 Manual refresh
Simply click on Select All (see 3.1.5) to refresh the entire table.
If you only wish to update a specific entity without losing your current search, you can right-click on the primary key and select the Reload record option.
3.6.2 Automatic refresh
The side bar features 3 automatic refreshment options:
- On activation: this is the default mode, refreshing the displayed entities without losing the current selection when the window returns to the foreground,
- On timer: with this option, visible data are refreshed regularly, every 10 seconds by default. This frequency can be modified in the ATL parameters (see 1.3.5).
- Deactivated: you can choose not to refresh data, for example to display two windows of the same selection, one of which remains in its initial state, while the other is modified and refreshed in real time.
In all cases, the automatic refresh setting is specific to each table.
3.7 Display preferences
Some tables have a lot of fields that you don't necessarily want to see all the time. Other fields, on the contrary, are very important and deserve to be seen at the beginning of the list. Finally, you may need different views depending on the context and your objectives. You can manage all these parameters using display preferences. For example, you can set a preference to display only indexed fields for quick searches, etc.
Preferences are independent for each table. However, they are shared by all users.
3.7.1 Creating a preference
Make the display settings to be memorized by choosing :
- columns to be displayed
- order of visible columns
- sort order (choice of column, descending or ascending)
- column width
- search options (indexed fields or all fields)
- object display and auto-refresh options.
Note: the search zone is not part of the memorized display criteria. Preferences therefore only concern the appearance of data, and not their content.
Click on the Add button.
Enter the name of the preference, which must not have already been used for this table. Spaces will be automatically removed at the beginning and end of the string.
Preference is saved
You can create as many preferences as you like by following the same procedure.
3.7.2 Calling up a preference
To modify the display according to a saved preference, simply select it from the preference list. Preference names appear in alphabetical order.
To return to a standard view with all fields, choose the “Clear” option in the selector. This does not delete the preference, but simply stops using it.
3.7.3 Modifying a preference
When a preference is in use, you can change its setting and name by modifying the parameters before clicking on the Modify button.
You can then:
- Confirm without changing the name. The current display settings will be saved with your preference.
- Confirm after modifying the name. The current display settings will be saved with your preference, which will be renamed.
- Cancel. The preference will not be modified. The current display settings will not be associated with any preference.
3.7.4 Favorite preference
When a table is opened, no preference is selected. All fields are displayed according to the ATL default settings.
By clicking on the Favorite button, the current preference will be used by default the next time the table is opened.
It is only possible to designate one favorite preference per table.
To change the default preference, you can either :
- select another preference and click on Favourite again to designate it as the new default preference.
- select the default preference and click on Favourite to delete the setting. No default preference will be used again.
3.7.5 Deleting a preference
To delete a preference, select it and click on the Delete button. A confirmation dialog is displayed.
Once confirmed, the preference is deleted and the display reverts to the ATL default setting.
If the deleted preference was a favorite, no more default preferences will exist for this table.
3.7.6 Refreshing a preference
It may happen that, once a preference has been selected, you have modified several display parameters (displayed columns, sorting, etc.) without wishing to modify the current preference.
Click on the refresh button to recall the preference and apply its settings. This action is equivalent to selecting the preference again from the list.