4D AIKit: Structured Outputs
When using AI in your application, you often need outputs that your code can parse, not just free-form text. Whether you’re generating data for a user interface, automating business logic, or orchestrating multi-step reasoning, predictable, machine-readable responses are essential.
That’s why 4D 21’s 4D AIKit introduces the new response_format attribute, letting you define the exact structure of the model’s output to ensure consistency, validation, and smooth integration into your app logic.
4D 20 R10 is Here
Introducing 4D 20 R10 – Available Now!
You don’t need more features. You need deeper ones. The kind that add meaning to your data. That catch mistakes before they happen. That react in real time, adapt to structure, and make intelligence feel native—not layered on.
4D 20 R10 does exactly that—richer context, tighter control, smarter defaults. It’s not just powerful. It’s purposeful.
Stricter class-based typing for objects
With 4D 20 R10, object typing takes a major step forward, giving you more confidence and control in your code. Instead of simply checking if a value is an object, 4D now verifies that it’s an instance of a specific class. This unlocks smarter auto-completion, inline validation, and stricter compilation checks, helping you catch mistakes early and write clearer, more maintainable code.
The benefits don’t stop at variables and function results. This enhancement also applies to your data model: you can now assign a user-defined or native class (like the new 4D.Vector for your AI implementation) directly to an object field in the structure editor. 4D then understands the full shape of the object, from design time to runtime, enabling a type-safe and more reliable development experience.
Smarter Copy-Paste to Protect Your Data
You work across environments — test, production, staging — and you copy more than text. Sometimes it’s formulas. Sometimes it’s data that shouldn’t move as freely as your cursor does. With 4D 20 R10, paste behavior gets smarter.
Formulas copied within the same app stay intact. But across environments, only values are pasted — never the underlying logic.
ORDA – Get started with the entity constructor
The 4D language supports the concept of classes and thus, the concept of constructor.
On the another hand, the ORDA abstraction layer, through Data Model Classes, provides a great business benefit. It allows you to write business-oriented code and “publish” it just like an API. Datastore, dataclasses, entity selections, and entities are all available as class objects that can contain functions as well as computed attributes, and aliases.
This leads your apps to follow easily the MVC principles with powerful and optimized code.
To work with a complete object-oriented approach, starting from 4D 20 R10, entity classes can now have a constructor(). Need to set up initial values when a new entity is instantiated? It’s now possible! Keep reading to learn more …
Building Forms on the fly with New Data Source Commands
In application development, it is often necessary to build forms dynamically. For example, you might want to generate a search form on the fly, tailored to the user’s needs. In 4D, there are two main approaches for building dynamic forms: either constructing the entire form programmatically or adding objects to an existing form layout. For the second option, until now, it was possible to duplicate objects with OBJECT DUPLICATE, and modify the data source with OBJECT SET DATA SOURCE, all using a classic pointer-based approach.
With 4D 20 R10, new and powerful commands, OBJECT SET DATA SOURCE FORMULA and OBJECT Get data source formula, allow developers to bind a formula as the data source of form objects. Moreover, you can dynamically assign formulas to key listbox properties with the LISTBOX SET PROPERTY command such as Current item, Current item position, and Selected items.
This opens the way to a more modern, flexible and readable approach, thanks in particular to expressions such as Form.xx or the classes.
4D 20 R10 Beta Starts Today
Beta testing for 4D 20 R10 starts today, introducing native vector support, real-time ORDA logic, and a wave of enhancements across UI, networking, security, and build automation—all designed to make your workflows faster, smarter, and more secure.
Tips & Tricks for your 4D Apps – April 2025 Edition
by Add Komoncharoensiri, Director of Technical Services at 4D Inc
Here we go with another set of tips and tricks.
The 4D Knowledge Base is a library of information about 4D technology where weekly tech tips and monthly tech notes are actively published. If you missed the last tips on the KB, that’s fine; here is a compilation from the past few weeks.
This blog post covers 15 tips:
Unlock the Power of AI with 4D AI Kit: Automate, Create, and Innovate
We’re excited to introduce 4D AI Kit, the first in a series of AI-powered features designed to bring intelligent capabilities directly into your 4D projects. As a built-in component, AI Kit enables seamless integration of OpenAI’s state-of-the-art models into your development environment reinforcing our commitment to putting AI at the heart of innovation in 4D.
With just a few lines of code, you can enrich your applications with intelligent features like image generation, content moderation, advanced visual analysis, and conversational chatbots. This is just the beginning! The possibilities are wide open, enabling you to create smarter, more dynamic, and more responsive solutions than ever before.
4D 20 R8 is Here
Introducing 4D 20 R8 – Available Now!
The latest feature release is packed with practical enhancements designed to make your development smoother, faster, and more powerful.
Download 4D 20 R8 (monthly Hot Fixes available)
- Smarter Syntax Checking in Form Editor: Catch errors early and code confidently with improved validation, intelligent auto-completion, and better object instantiation support
- Faster Form Editing: Work faster with the updated FORM EDIT command—open forms and select objects directly in your code for quicker modifications.
- Advanced HTTP Request Handlers: Gain full control over incoming web requests using the enhanced capabilities of the 4D HTTP Server.
- Debug 4D in Visual Studio Code: Step through your code in VS Code with the new 4D-Debugger extension—debugging has never been this accessible.
- Enhanced Document Handling: Simplify the way you manage sections, tables, and content with new commands that give you more flexibility.
- Improved Excel File Control in 4D View Pro: Enjoy finer control over your Excel imports and exports for smoother data handling.
This is just a glimpse of what’s available in 4D 20 R8. Download 4D 20 R8 and discover how far you can go with this feature release.
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
