4D Blog

Home Product 4D for iOS: Sort criteria and action parameters enhancements

4D for iOS: Sort criteria and action parameters enhancements

October 7, 2021

Product

4D for iOS gives you the ability to define actions that automatically call a 4D method linked with an event on the smartphone. For example, using them, you can execute 4D code, manage and edit your app’s content using parameters, and, more recently, sort your app’s content easily using sort actions!

Defining sort criteria and action parameters has been improved to make things easier and help you work more quickly and efficiently.

Action parameters

As you probably know, 4D for iOS offers various types of preset actions to ease your development process:

  • Add
  • Edit
  • Delete
  • Share
  • Sort

So what’s new?

Sort Criteria

Regarding the Sort action, you can now easily change action sort criteria using a simple dropbox. This enables you to choose another field among the available ones:

blank

linking action parameters to FIELDS

For the Add… and Edit… preset actions, at the bottom of the Action Parameters panel, a message indicates when a parameter is linked to an existing field:

blank

Why link action parameters to FIELDS?

By linking your parameters to your fields, the MobileAppServer component can help you simplify your 4D code in your On Mobile App Action database method.

As a reminder, the MobileAppServer component, which is built in 4D, gives you access to various utility methods to speed up your 4D mobile app backend coding.

In our case, it will allow you to get a dataClass or entity using generic code, and map parameters and fields generically. So there’s no need to write specific code anymore!

Here is an example of the On Mobile App Action that you can get using the Add preset action and the MobileAppServer component :

#DECLARE($request : Object)->$response : Object
$action:=MobileAppServer.Action.new($request)
$response:=New object("success"; False)

Case of 
 : ($action.name="addEmployees") // add@

  var $entity; $status : Object
  $entity:=$action.newEntity()
  $status:=$entity.save()  // save the entity

  If ($status.success)
    $response.success:=True  // notify App that action success
    $response.dataSynchro:=True  // notify App to refresh the selection
    $response.statusText:="Employee added"
			
  Else 
    $response.statusText:="Failed to add"  // $status.statusText
    $response.errors:=$status.errors
  End if 
End case 

As a reminder, to add linked parameters to the field, click on the plus button arrow located at the bottom of the action parameter’s panel:

blank

And you are still free to create parameters that do not have representation in your database, by clicking on the New parameter item from the menu.

Starting with v19 R3, you can edit and link/unlink an action parameter by changing its name: 4D for iOS detects automatically if the name of a parameter corresponds to an existing field name. And best of all, 4D for iOS helps with autocompletion and tells you which fields are available and linked with your parameter. Once it is linked, all the parameter properties are automatically adapted depending on the linked field type.

 

blank

For those who were already using actions, all your logic is, of course, preserved.

This feature looks very simple, but I can fully guarantee that it will make your 4D for iOS app creation process much more pleasant!

Feel free to comment on the 4D forum, and check the dedicated documentation for more details.

Discuss

Tags 4D for iOS, Go mobile, Mobility, v19 R3, v20

Latest related posts

  • December 3, 2025

    Give AI to a 30 years old 4D application

  • November 28, 2025

    ORDA – Handle an event-driven logic during database operations

  • November 27, 2025

    ORDA – Permissions – Restrict / allow web access to the resources in one click

David Azancot
David Azancot
– 4D for iOS Product Owner – David Azancot joined the 4D Product team as a Product Owner in 2017. He is responsible for writing user stories and translating them into functional specifications. His role also includes ensuring that feature implementations meet customer needs. David holds an MBA in Marketing, Internet, and Mobility from the Institut Léonard de Vinci. He began his career in 2011 at a mobile startup that was later acquired by Madvertise (a mobile marketing group). Passionate about mobile interfaces, he was a natural choice to develop interactive mobile ad formats for the group in 2015. In parallel, David has been developing his own iOS and Android applications since 2012.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

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