Tips

Tips & Tricks for your 4D Apps – February 2023 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 20 tips:

Tips blank

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

Tips & Tricks for your 4D Apps – January 2023 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 25 tips:

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:

Tips blank

A Tailor Made Native App: Place Orders with 4D for mobile

4D v19 R6 and v19 R7 brought two interesting features to 4D for Mobile. Sessions and displaying web pages served by the 4D server in your native mobile app. But did you think about the possibilities you get when combining them both?

This blog post will show you one of these possibilities. We are going to see how to build a simple app that enables mobile users to place orders with their central purchasing office to consolidate their stock:

Page 1 of 11