Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
Delphi

Free Field Service App Template Solution Quick Start Guide For Android, iOS, macOS, and Windows

The RAD Server Field Service Template consists of three main components and a setup application (also check out the deep dive). The Field Service Admin app has been tested on Windows and macOS (but probably also runs on Android and iOS). The Field Service App has been tested on Android, iOS, macOS, and Windows. The Field Service Setup has been tested on Windows. The Field Service Server has been tested on Windows but may also run on Linux. This is an excerpt from the RAD Studio Field Service Template quick start guide. You can download the Field Service Template from Embarcadero GetIt. The three main components of the Field Service template(plus the setup) are:

 

  • Field Service Admin

  • Field Service App

  • Field Service Server (RAD Server)

  • Field Service Setup

 

The RAD Server Field Service project contains REST endpoints which the Field Service Admin and Field Service App connect to. It utilizes InterBase on the back end for its database storage. The Field Service Setup app will set up your Field Service database and connect to your existing RAD Server database. It will create 3 user accounts and load the database with sample data. You will also need to retrieve a free IBLite license file and add it to your InterBase directory for the Field Service App.

 

I. Configure RAD Server

 

Step 1:

You will first need to set up your development RAD Server. You can read the directions here:

http://docwiki.embarcadero.com/RADStudio/Berlin/en/Running_the_EMS_Server_or_EMS_Console_Server_on_a_Developer_Environment

 

You will then need to configure your RAD Server to support multi-tenants before you launch the setup application. You should configure your emsserver.ini file to contain the following setting to enable multi-tenant support:

 

[Server.Tenants]

MultiTenantMode=1

 

You need 3 user account spaces available (the developer server limits you to 5 user accounts). The default tenant 1 used in the setup is as follows with a password of “secret”:

00000000-0000-0000-0000-000000000001

 

Step 2:

Open the FieldServiceServer project and configure the path to your RAD Server (EMS) database and your field service database in the TFDConnection component in both DataModules. The default path in the setup app will be C:UsersPublicDocumentsEmbarcaderoEMSFIELDSERVICE.IB

 

Step 3:

Run the project to deploy your edge module into the RAD Server (EMS) Development Server.

 

 

II. Launch the Field Service Setup

Once this is complete you should open and run the Field Service Setup app. You will move through each step first configuring the location of the databases, then creating the user accounts, and finally creating the tables in the database and loading them with the sample data.

 

Step 1:

You will need to set a path to your field service database. It will be created if it does not exist. The default is:

C:UsersPublicDocumentsEmbarcaderoEMSFIELDSERVICE.IB

 

You will need to set a path to your EMSServer database. The default is:

C:UsersPublicDocumentsEmbarcaderoEMSEMSSERVER.IB

 

Step 2:

The three accounts that are created are manager1, technician1, and technician2. The passwords should all be “password” which you can use to log in to the Field Service Admin and Field Service App after setup.

 

When you run Setup Users no user account should be required.

 

Step 3:

Press the Initialize All button to create the InterBase database using the three tables listed and fill them with sample data.

 

Step 4:

You should be able to view the sample data that was inserted into the database on Step 4. You shouldn’t need to change anything here but you could come back later and Reset the data if needed.

 

Step 5:

Locate the IBLite registration file that you download from the Product Registration Portal. It may be in your Downloads directory by default. The filename will be similar to regXXXX_XXXXXXXX.txt where the X’s are numbers. The file will ultimately need to be named reg_iblite.txt.

 

Once you locate the file you can use the Install License button in the Setup app to copy it to:

C:UsersPublicDocumentsEmbarcaderoInterBaseredistInterBase2017

 

At this point the tenants, users, database, tables, and data should now be setup for the template.

 

III. Field Service App

 

Step 1:

Open the FieldServiceApp project.

 

Step 2:

Configure the EMS_SERVER and EMS_PORT const in uMainForm.pas to point at your development server. The default is localhost 8080.

 

Optionally you can get the Google Maps API keys and insert them into the const section as well.

 

Get an API key from here https://developers.google.com/maps/documentation/embed/get-api-key

and place it in the GOOGLE_MAPS_EMBED_API_KEY const. This key will allow you to open a real time map of the appointment and history locations.

 

Get an API key from here https://developers.google.com/maps/documentation/static-maps/get-api-key and place it in the GOOGLE_MAPS_STATIC_API_KEY const. This key will allow you to view static map images on the detail tabs of the appointments and history.

 

 

Step 3:

Run the project to deploy your client to Windows. You should be able to select your tenant, log into a technician user account, and interact with the sample data.

 

Overview

Login Page

  • Allows a technician to login to the Field Service system – optionally choosing to authenticate to a specific instance.

 

Appointment Page

  • Allows a technician to view appointments assigned to their user.  Appointments are sorted by next scheduled appointment.

  • Additional information may be obtained by clicking on a specific appointment.

  • Specific appointments may be marked as completed when finished.

 

History Page

  • Shows appointments marked as completed.

 

Parts Page

  • A list of parts from the server.  Shows the name, a photo, quantity, and the location of each part.

 

Profile Page

  • Shows information about the currently logged in user.

 

Notification Page

  • Shows notifications of new jobs recently assigned to the current user.

  • Notifications may be clicked on to display the record details.  Once clicked, the notification is considered read and disappears.

 

Data Sync Page

  • Shows information about the last synced date for the data.

  • Allows a user to sync data when they are online.

 

 

IV. Field Service Admin

 

Step 1:

Open the FieldServiceAdmin project.

 

Step 2:

Configure the EMS_SERVER and EMS_PORT const in uMainForm.pas to point at your development server. The default is localhost 8080.

 

Optionally you can get the Google Maps API keys and insert them into the const section as well.

 

Get an API key from here https://developers.google.com/maps/documentation/geocoding/get-api-key and place it in the GOOGLE_GEOCODING_API_KEY const. This key will allow you to convert addresses to latitude and longitude.

 

 

Step 3:

Run the project to deploy your client to Windows. You should be able to select your tenant, log into a manager user account, and interact with the sample data.

 

Overview

Login Page

  • Allows an admin to login to the Field Service Admin system – optionally choosing to authenticate to a specific instance.

 

Appointment Page

  • Allows an admin to create/update/delete appointments and assign them to specific technicians.  Appointments are sorted in date descending order.

  • Appointments are searchable by customer.

  • Edit an appointment by clicking on it.

  • Specific appointments may be deleted.

 

History Page

  • Shows all appointments marked as completed.

  • Additional information may be obtained by clicking on an appointment.

 

Parts Page

  • A list of parts from the server.  Allows an admin to manage the name, a photo, quantity, and the location of each part.

 

User Page

  • Allows an admin to manage system user and set their permissions.

 

Data Sync Page

  • Shows information about the last synced date for the data.

  • Allows a user to sync data when they are online.


Check out the extensive deep dive into the free Field Service Template for Android, iOS, macOS, and Windows.

Do you want to create a Field Service App for iOS, Android, macOS, and Windows? Try the Cross-Platform Development Frameworks, which can help you create apps that support database servers in the Delphi or C++ environments.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

FMXExpress.com has over 600 articles with all kinds of tips and tricks for Delphi FireMonkey on Android, IOS, OSX, Windows, and Linux.

2 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES