Programmatically access elements in 4D Write Pro
4D Write Pro keeps offering more and more programming capabilities! Let’s say you want to programmatically change the style of a table, paragraph, or image in an existing 4D Write Pro document. With 4D v17, it’s possible! Now you can access any element or part of a document, by programming. These parts, called elements, will be returned either as a collection thanks to the WP Get elements function, or as a single element with WP Get element by ID function.
Locking entities with ORDA
The ORDA series continues! In this blog post, we’ll look at how you can use locks in your databases with ORDA concepts! It’s not uncommon to need to manage conflicts that might occur when several users or processes load and/or attempt to modify the same records at the same time. Record locking is a methodology used in relational databases to avoid inconsistent updates to data.
ORDA provides an optimistic locking mode in addition to the one you already know (pessimistic locking).
Loops, loops and … more loops!
Like many other programming languages, 4D provides the ability to iterate over numbers with a For(…) / End for statement, or over a condition thanks to the While(…)/End while and Repeat/Until(…) keywords. These iterations (or loops) are very useful, but not the most appropriate way to iterate over advanced data types such as collections and entity selections. That’s why the new For each(…)/End for each iterator has been created, to help ease your coding!
How to create a dynamic form from a table in 3 steps!
4D v17 includes dynamic forms, initially introduced in 4D v16 R6, a powerful and flexible way to dynamically build forms fully adapted to your end users’ needs. The possibilities of dynamic forms are tremendous. In this post, we’ll see a concrete example of what you can do with these new forms.
ORDA: work with objects and collections
In this latest addition to the ORDA series, we’ll look at how the new ORDA concepts can interact with existing objects and collections. In fact, it’s possible to turn entities and entity selections into objects and collections, as well as build entities and entity selections from objects and collections. By doing so, you can easily integrate ORDA code within your existing code. You can take full advantage of ORDA without needing to rewrite your code!
Going back and forth between current selections to ORDA
ORDA is a major innovation of 4D v17, this is why we’re dedicating an entire series of blog posts to ORDA. While ORDA has its own concepts that are very different from the classic approach, it’s still possible to mix ORDA with your existing code.
In a nutshell, this blog post will show you how you can update the current selection of a table from an entity selection and get an entity selection from the current selection of a table. It’ll allow you to smoothly integrate ORDA concepts into your existing 4D code, step by step.
Display a collection in a listbox
Recently, 4D introduced of a new type of variable: collections, as well as a large set of methods to manipulate them. With 4D v17, the possibilities of collections is becoming larger by being able to easily display the content of a collection. How? List boxes of collection type!
Query your database with an object-oriented approach
After learning how you can create, update, and delete data, here is a new entry in the ORDA series. In this post, you will see how you can query your datastore in an object-oriented mode. With ORDA, queries are lighter, more readable, and you can navigate through the whole data model using object-oriented concepts !
On top of that, ORDA makes it possible to very easily query several related tables, manage recursive relations on the same table, and use several logical operators in a single query. Plus, you don’t have to worry about setting relations between tables … manually or automatically !
A+ security ranking for 4D web sites
After introducing Perfect Forward Secrecy, the security level of 4D Web server has been increased again with the support of HTTP Strict transport Security (HSTS). Henceforth, 4D Web server is compliant with the very latest security protocols. Simply upgrade to 4D v17 and enable HSTS to get the A+ ranking (the highest level) from SSL Labs for your web sites!
Create multi-column documents in 4D Write Pro
Sometimes the information you include in your document is best displayed in columns. Not only can columns help improve readability, but some types of documents – newspaper articles, newsletters, flyers, etc. – are often written in column format. The good news is that with 4D v17, you can henceforth create multi-column documents with 4D Write Pro! And beyond document creation, you can also convert your existing 4D Write documents containing multiple columns.
As in the 4D Write plugin, it’s possible to define the number of columns for an entire document. But here’s a good example where 4D Write Pro exceeds 4D Write: you can also set a different number of columns … per section!
Contact us
Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!
* Your privacy is very important to us. Please click here to view our Policy