Data explorer – Preview
4D v18 R6 offers a preview version of 4D Data Explorer. 4D developers or administrators can now easily explore their application data in a web browser. Check out this blog post for more details.
4D WEB Server
Scalable web sessions
With 4D v18 R6, the 4D Web Server offers a new kind of web session that will greatly improve the performance of your web applications: the scalable web session.
Scalable web sessions are able to handle several processes in preemptive mode. This means that they can handle several user agent requests at the same time, and they also can share data between these processes.
4D for iOS
Push notification with data synchronization
Push notifications are a perfect way to keep your iOS app users engaged and informed.
Now with 4D v18 R6, you can set up push notifications to trigger synchronization on iOS devices. This allows the user interface to be updated instantly, providing users with real-time data they can check upon receiving a notification.
many to many relations
You can now access and publish One to Many relations from your Many to One relations in the Structure section. In short, this means you can display Many to Many relations, which allows you to deliver iOS apps with better ergonomics than ever before! This comes with additional features such as adding interactions to a field by dropping a relationship onto it and displaying the corresponding record number from clicking on the One to Many relations.
Support of barcode scan
Searching is greatly enhanced with 4D v18 R6 thanks to the addition of barcode scan support. This makes it possible to have apps adapted to field situations (e.g., for warehouse inventory needs).
More technically, this feature allows:
- Filtering a list form depending on the code’s value. If a record matches the barcode value, this will directly open the record’s detail form.
- When combined with deep linking, you’ll be able to display specific list and detail forms just by scanning a barcode whose values are URL Schemes or Universal Links.
New parameter formats: Signature and barcode
To help make your apps more interactive, 4D v18 R6 adds new parameter formats to 4D for iOS:
- Signature format: sign with a fingertip and send signatures directly from your app to the server. This could be useful to collect customer signatures after a package delivery, for example.
- Barcode format: associate any value with a barcode (EAN13, EAN8, QR Code, etc.) to be extracted by simply scanning it from an Action form. This is a very convenient way to add, for instance, an item reference by scanning a QR Code directly from your app.
OAuth 2.0 support
OAuth 2.0 is an authentication and authorization standard that protects user data by providing access to the data without revealing the user’s identity or credentials. Lately, email servers have started to move to this standard to increase security.
Starting with 4D v18 R6, we’re providing a way to set OAuth 2.0 authentication mode for a connection. IMAP, SMTP, and POP3 transporters now natively support the OAuth 2.0 protocol!
Manage IMAP flags
The IMAP protocol allows you to associate a list of flags with a message in order to manage additional information. With 4D v18 R6, we’ve added a set of functions to the IMAP transporter object to add or remove IMAP flags.
With IMAP protocol you can manage five flags :
- \Seen: Message has been read.
- \Answered: Message has been answered.
- \Flagged: Message is marked as “flagged” for urgent/special attention.
- \Deleted: Message is marked as “to be deleted”. The removal takes effect when the expunge() function is called, switch mailboxes, or close the connection. This flag is already added by the delete() function
- \Draft: Message has not completed composition (marked as a draft).
Save Emails in a specific mailbox
Just in case your customers are expecting to get a copy in the “Sent” mailbox displayed by Outlook or Apple Mail when sending emails from 4D, 4D v18 R6 has the answer. To save a copy of your email after sending it:
- First, create two transporters: an SMTP transporter to send the email to your client, and an IMAP transporter to upload your email to your mail server.
- After sending your email with SMTP, use the append() function of the IMAP transporter.
String comparison improvements
4D provides very versatile tools for searching and comparing strings that can be adapted to the contexts and situations encountered by developers.
With 4D v18 R6, updates have been made to the Position command and the new Compare strings command has been added:
- Position: this command now has more comparison abilities such as “case sensitive” or “accent sensitive”, the Japanese language (Hiragana/Katagana), and character width are also available as search options, along with “whole word”.
- Compare strings: this new command allows you to compare strings with the same options as the ones added to the Position command. This command is based on the language defined in the database settings. This can be really useful to allow specific sorts for example.
Display the prototype of a function and a short description
To simplify and facilitate the writing of code in the editor, the prototype of a function and a short description are displayed in the code editor.
The suggestion list displays intelligent code completion (with a short description) and prototype so that you can write code more quickly and correctly. And while you’re writing your function, 4D displays the function’s prototype and a short description of the function. It also highlights the parameter that you’re currently completing.
More information at your disposal
4D v18 R6 includes new options and additional information that will make it easier to trace and analyze your code.
- Parameters: Knowing the input and output parameters of a method or function, as well as their type, is essential for debugging code. The declaration line is displayed at the top-left of the debugger window. In the call chain pane, you can choose to display (or not) the parameter’s type.
- Comments: To help explain a method or function, a common practice is to include comments at the beginning of code blocks. These comments are now visible in the debugger.
4D View Pro
Are you done yet?
4D v18 R6 ships with two new events to enable you to know when your calculations have completed: On VP Range Changed and on Timer event.
This could be useful, for instance, when you load a large 4D View Pro with a lot of formulas, and the calculations can take some time to be completed. Or if you use an offscreen area and want, for example, to export the document as PDF or Excel format, you need to wait for the end of these calculations before doing it.
Find and replace
There are times when you initialize a 4D View Pro document, that you need to find some values or tags and replace them with data issued from 4D. Now it’s a breeze with the VP Find command. Thanks to this command, you can find data, formulas, or tags and replace them in the entire sheet or only a specific part of it.
Manage clicks in edited cells
Starting with 4D v18 R6, the on clicked form event is triggered whether a cell is being edited or not, giving you increased control and improving the interface. This could be useful, for instance, if you want to display possible values using a contextual menu for a cell when it’s being edited. Once the row is selected, you can offer a color choice for that particular row or cell.
As for compatibility, if you already have code that runs during the on clicked event, you may want to stop the execution of that code when a click occurs inside an edited cell. In this case, simply test the state of this cell with the is editing text function in advance.
4D Write Pro
To help you create documents even faster and easier, 4D v18 R6 brings new enhancements to the toolbar and sidebar. Now you can:
- increment or decrement text
- copy/paste the ruler
- change the background color of a paragraph
- change the style of a word (uppercase, lowercase, etc.)