With 4D v17 R4, embedding and displaying filtered content in your 4D for iOS app is a piece of cake! With this R-release, you’ll be able to filter the data to be displayed in your mobile app.
A new Data section is available to let you filter the data sent to mobile devices. In previous versions, you were limited to a subset of tables and fields. Now you can control which records are sent – independently – for each iPhone or user.
For example, you might want to synchronize only invoices from the last year or customers of a specific sales team, filtered by region.
To ease development and testing, the new Data section allows you to define the data source the data comes from (Current data file or Production server data file) and to specify if you want to regenerate data automatically each time you build your app or generate it manually.
In the 4D for iOS documentation this Data section is documented to help you easily define your first filters.
A tutorial is also available to explain query filters based on user’s information. At the end of the tutorial, you’ll be able to display content depending on the login used. As you can see in the images below, which show the final results of the tutorial, the app content is filtered based on the “In Progress” contracts AND according to the salesperson that is logged in.
Only Michelle Simpson’s In Progress contracts are sent to the iPhone, drastically reducing synchronization time and data volume.
Happy filtering!