How to create a generic form with dynamic forms
Imagine that your database contains several tables of types or categories. These tables are very simple, often with only an identifier and a text field. For demonstration purposes, let’s say it’s a shoe management database. To qualify the products, we need to define their type, color, pattern, material, season and so on.
It’s cumbersome to manage each of these tables in a list form and an input form and associated methods. In this case, the use of a generic form is essential to avoid duplication and simplify maintenance.
And that’s where dynamic forms and JSON pointers are come in handy!
Display an entity selection in a list box
4D v17 introduces a new concept: ORDA. If you’re not familiar with ORDA yet, we’ve created a series of blog posts to explain how to use and take advantage of ORDA. When working with ORDA, you’re going to use entity selections, which are basically objects containing references to entities belonging to the same dataclass (i.e. table). One of the main benefits of ORDA, is the very simple and powerful ability of binding with forms.
In this blog post, you’ll learn how to display an entity selection in a list box. In fact, it’s very simple.
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.
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!
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!
Icon modernization continues
While icons may seem insignificant in the grand scheme of design, they actually play a crucial role in improving human-software interactions by offering a method of communication beyond just text.
With 4D v16 R6, we have modernized the look of the Form Editor and the User Form Editor icons to improve readability and clarity.
Easy access to log files
Log files can be extremely useful for troubleshooting. They’re also a big help for finding the root cause of an incident. Logs let us track of where a problem occurred, and when. Before, with the Get 4D folder command, you could easily access the folder containing all the logs. Now, 4D v16 R6 makes easy to find a particular log file, thanks to the enhancement of the Get 4D file command.
Discover the power of dynamic forms
You’ve told us how much you want a feature to dynamically build forms fully adapted to your end users’ needs. Well, we heard you, and 4D v16 R6 now opens new opportunities with dynamic forms! Provided as a preview in 4D v16 R6, dynamic forms allow you to programmatically build your forms in an object or load them from a text file. But this only scratches the surface of what we’ve cooked up for you…
Images in absolute position in 4D Write Pro
Pictures speak louder than words, or so they say. In fact, according to researchers the brain processes images 60,000 times faster than words. 4D Write Pro is constantly evolving, version after version, to support more and more picture-related features. After in-line pictures and background pictures, 4D v16 R6 gives you the full control over picture insertion at a specific position in a document, in front of or behind text, as well as anchored to the page or specific parts of the document (i.e., header, footer, sections).
Play videos with 4D
We’re in the visual and interactive content era. It’s becoming increasingly more and more prominent. Take a look at digital community statistics and you’ll discover that YouTube is the second most popular social network.
At some point, most web developers want to include videos in their sites and coincidentally, databases frequently contain links to videos (either hosted locally or on the web). This post shows you two ways to include videos in your 4D applications.
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