Tips

4D for Mobile Tutorial – Choose an Input Control

Formatters allow you to format the displayed data or to define behavior when the user touches the data. The input controls follow the same principle. They allow you to select the type of keyboard, define the behavior, or format the data in an action form.

For example, for image data, you have by default two types of control, the first one allows you to select an image or to take a picture, and the second one displays a zone to sign.

There are 3 types of input controls:

Tips blank

4D for Mobile Tutorial – Create actions

Actions allow users to interact with the application to change the customer’s address, add a new contact and modify a picture.

In the 4D language, an action allows you to add, edit, and delete an entity or a selection entity. But also, it can simply execute a method of your 4D server.

Tips blank

4D for Mobile Tutorial – Using Formatters

A data formatter allows you to map a data type from your database to a specific display on the mobile side. For example, you can define a date, percentage, or currency format. Data formatters can also call some code to create intelligent interfaces.

For example, you can attach a data formatter to phone numbers that open an action menu on the mobile app when the user touches the number (e.g., to call the person or save them in contacts).

You have three formatter types:

Tips blank

4D for Mobile Tutorial – Define filter queries

For a mobile application, data is usually filtered to preserve storage space and provide direct and quick access to essential data.

With 4D, you have two types of filters.

  • A static filter to filter the data for a table. For example, limit to tasks with the status ‘in progress.’
  • A dynamic filter depends on the user’s information. For example, return only the user’s tasks.

 

This tutorial will show you how to use and combine these two filters.

Tips blank

4D for Mobile Tutorial – Your first application

The 4D mobile application generator allows you to create mobile applications for Android and iOS. In the documentation, you have several tutorials to help you get started and even go further with advanced apps.

The first example is simple and allows you to create a contact catalog. All the details can be found here

And if you prefer, here are all the steps in the video:

Product blank

Create your Native Mobile Application with 4D

4D for Android and 4D for iOS allow you to configure, design, build, and deploy native Android and/or iOS apps based on a 4D database. Once generated and deployed, mobile clients can connect to the 4D Server and interact with new or existing data without additional requirements.

4D for Android and 4D for iOS are included in a single integrated 4D component. You can create a mobile project and decide to build it for Android, iOS, or both.

4D handles the complexity and generates an Xcode project in Swift or an Android project in Kotlin. Then, you can reopen them with Xcode and Android Studio and continue to work on them.

This blog post is a compilation of features available in our mobile solution that enables you to build a complete app that goes all out!