Page Wizard

To create a REST page, you must complete the REST Wizard.  The Wizard has different steps, depending on the options you choose.  

 

Page Layout

The most important option is the Page Layout step, which gives you the following choices:

The Page Layout you select will determine what kind of page you can create.

The Page Layout step is the only step that cannot be changed later.

 

 

Page Layout step

Page Name

Required step for these layout types: List, Detail, Input, Search & Filter

The first time you go through the wizard for a page, the Page Name step follows the Page Layout step.  When you later go to the wizard to edit the page, you will come to the Page Name step first (because the Page Layout cannot be changed).

The Page Name step allows you to name your page.  The "Page Name" field is what will be displayed to you in the MobileSmith platform as you construct your app.  The "Display Name" field is what will be displayed to the app user when he uses the app on his mobile device.

For a Search & Filter page, you will have two pages to name - the Search page and the Results page.  Each one has a Page Name and a Display Name.

The Page Name step also gives you more detail about the Page Layout you selected on the Page Layout step.

 

 

Page Name step

REST Service URL

Required step for these layout types: List, Detail, Input, Search & Filter

The REST Service URL step always follows the Page Name step.

The REST Service URL step allows you to enter the URL(s) needed to interact with your REST database.


Request Type

For List and Detail pages, the Request Type is always GET.  You can enter one URL that will be used in the GET call.

For Input pages, you can select PUT or POST.  If you select POST, you can enter one URL that will be used in the POST call.  If you select PUT, you can enter one URL that will be used in the PUT call, and another URL that will be used in the GET call.  This is because PUT is generally used to edit existing data and the GET call is needed to obtain the existing data.  POST is generally used to create new data, so a GET call is not needed.


Check For Variables

You can use variables in your URL by "parameterizing" them.  To do this, enclose the variable in {curly braces}, like this:

https://hospitaldomain.com/rest/doctor/doctor_id={doctor_id}

If you click "Check for Variables", it will allow you to enter a sample value for each parameter.  In the above URL, you would be able to enter a sample value for the "doctor_id" field.  This will allow you to test the call and verify that it returns the correct data.


Include Custom Headers

Check this if your REST call needs custom headers.  You can enter as many key/value pairs as needed.


Allow user to delete items

Check this if you want the app user to be able to delete items.  You can enter the URL that will delete an item.  When the app user deletes an item, the app will execute this URL with request type DELETE.


Send

Click "Send" to execute the REST call and see the data returned.

 

 

REST Service URL step 



User Location

If you want to include the device user's current location in your REST call, you can do using specific custom headers.  You will need to check the "Include Custom Headers" checkbox and then add two custom headers - one for latitude and one for longitude.  Use "{MOST.LATITUDE}" as the value for the latitude, and use "{MOST.LONGITUDE}" as the value for the longitude.  If you are not sure what to use for the keys, check with your REST server provider.

**NOTE** These headers will not be added to the call if the user does not allow the app to access his location.


Select Parent Node

Required step for these layout types: List

The Select Parent Node step always follows the REST Service URL step.

The Select Parent Node step allows you to specify which part of the data structure to use as the root.  Oftentimes there will only be one option for the root, but in case there are more, the wizard lets you choose where the app should look for the list of items.

 

 

 

Select Parent Node step

Data Mapping

Required step for these layout types: List, Detail, Input, Search & Filter

For a List page, the Data Mapping step always follows the Select Parent Node step.
For a Detail or Input page, the Data Mapping step always follows the REST Service URL step. 

The Data Mapping step allows you to define the type of data in each field.  You can also set the Display Name, which will be the name shown when you are designing the page's canvas.

For List and Detail pages, you can choose from the following field types:

  • Short Text
  • Long Text
  • Long Text with HTML Content
  • Street Address
  • Phone Number
  • Email Address
  • Date & Time
  • Date
  • Time
  • Icon
  • Thumbnail
  • Image
  • Web Link
  • Audio Link
  • Video Link
  • Latitude
  • Longitude

 

For Input pages, you can choose from the following input types:

  • Text Box
  • Text Area
  • Dropdown
  • Check Box
  • Photo
  • Date
  • Time
  • Date & Time
  • Hidden Field

The "Hidden Field" type should be used when there is a field that you want to be sent to the database but you don't want the app user to see it.  A common example would be ID fields.

 

 

 

Data Mapping step for List, Detail

 

Data Mapping step for Input page

 

Dropdown Menu

Optional step for these layout types: Input, Search & Filter

This step is only shown when you have selected "Dropdown" as the input type for at least one field on the Data Mapping step.

When it is shown, the Dropdown Menu step always follows the Data Mapping step.

The Dropdown Menu step allows you to specify the options shown to the app user in one or more dropdown menus.

For each field set to be a dropdown, you can add as many options as you like.  For each option, you must enter a Database Name and a Display Name.  The Database Name is what will be sent to your REST database when the app user submits the page.  The Display Name is what will be shown to the app user.

For example, you might want a page where an app user can add a new employee.  Your REST database might keep track of departments with ID numbers, which might not make sense to the app user.  The app user may know that the new employee belongs in the Sales department, but he is unlikely to know that the database represents the Sales department with "5552042a20ead7f228b3899f".  For the Department field, you can enter one option with "5552042a20ead7f228b3899f" as the Database Name and "Sales" as the Display Name.  The app user will see "Sales", and the database will receive "5552042a20ead7f228b3899f".

 

 

Dropdown Menu step

 

Dropdown field on iPhone

 

Available Features

Required step for these layout types: List, Detail, Input, Search & Filter

For a List or Detail page, the Available Features step always follows the Data Mapping step.

For an Input page, the Available Features step follows the Dropdown Menu step if it is shown.  Otherwise, it follows the Data Mapping step.

The Available Features allows you to select which additional features you want for the page.  The selections made on this page affect what other steps are shown in the wizard.  There are different features available for each layout type:

List

  • Pagination 

Detail

  • Add To Calendar
  • Sharing 

Input

  • FastFill 

 

 

Available Features step for List

 

Available Features step for Detail

 

Available Features step for Input

 

Pagination

Optional step for these layout types: List, Search & Filter

The Pagination step is only shown if you have selected "Enable" for Pagination on the Available Features step of the wizard.  If so, it always follows the Available Features step.

When you have a REST call that returns a large number of items, you can use pagination to limit the amount of data sent to the page for each request.  This step allows you to choose which field is a URL that can be called to get the "next page" of results.

For example, you may have a REST call that returns the first 10 items in a list, along with a URL that, when called, will return the next 10 items (i.e. items #11-20).  In that case, you would select that URL on the Pagination step of the wizard as your Next Page URL.  When the app user goes to this page on his mobile device, he will see a list containing 10 items.  When he scrolls to the bottom, the app will execute the Next Page URL and add the returned items to the list.  The list would now contain 20 items.  Every time the app user scrolls to the bottom of the list, the app executes the Next Page URL and adds the returned items to the list.

For more on pagination, click here.

 

 

 Pagination step

Add To Calendar

Optional step for these layout types: Detail

The Add To Calendar step is only shown if you have selected "Enable" for Add To Calendar on the Available Features step of the wizard.  If so, it always follows the Available Features step.

The ATC feature allows your app user to add an item from your app to the calendar app on his mobile device.  A common example is an app with a list of events, such as the sessions of a conference.

You can specify which data field to use for the following fields, although only Start Date is required:

  • Title (optional)
    • Only "Short Text" fields will appear as options.
    • The Title will be shared to the calendar app and pre-fill the "Title" field of the event.
  • Start Date (required)
    • Only "Date" and "Date & Time" fields will appear as options.
    • The Start Date will be shared to the calendar app and pre-fill the "Starts" date field.
  • Start Time (optional)
    • Only "Time" fields will appear as options.
    • The Start Time will be shared to the calendar app and pre-fill the "Starts" time field.
  • End Date (optional)
    • Only "Date" and "Date & Time" fields will appear as options.
    • The End Date will be shared to calendar app and pre-fill the "Ends" date field.
  • End Time (optional)
    • Only "Time" fields will appear as options.
    • The End Time will be shared to the calendar app and pre-fill the "Ends" time field.

 

 

 Add To Calendar step

Sharing

Optional step for these layout types: Detail

The Sharing step is only shown if you have selected "Enable" for Sharing on the Available Features step of the wizard.  If you also selected "Enable" for Add To Calendar, the Sharing step follows the Add To Calendar step.  Otherwise, the Sharing step follows the Available Features step.

The Sharing feature allows the app user to share certain fields from an item in your app to Facebook, Twitter, and/or email.

You can populate one or more of the following fields with data returned by the page's REST call:

  • Title
    • Only "Short Text" fields will appear as options.
  • Caption
    • Only "Short Text" fields will appear as options.
  • Description
    • Only "Short Text" and "Long Text" fields will appear as options.
  • Image
    • Only "Icon", "Thumbnail", and "Image" fields will appear as options.
  • Link
    • Only "Web Link" fields will appear as options.

You must select at least one field to share.

 

 

 Sharing step

FastFill

Optional step for these layout types: Input

FastFill is a feature created by Jumio which collects data by scanning a driver license, passport, or ID card.

The FastFill step is only shown if you have selected "Enable" for FastFill on the Available Features step of the wizard.  If so, it always follows the Available Features step.

Jumio FastFill

 

 

 

 

 FastFill step

Review

Required step for these layout types: List, Detail, Input, Search & Filter

The Review step is always the final step of the wizard.  It displays the completed wizard steps.  The step is strictly informative - there are no options to configure.

 

 

 Review step

Step Sequence

Here are the wizard steps for each Page Layout type:

List

  • Page Layout (does not appear once Page Name step has been saved)
  • Page Name
  • REST Service URL
  • Select Parent Node
  • Data Mapping
  • Available Features
  • Pagination (optional)
  • Review

Detail

  • Page Layout (does not appear once Page Name step has been saved)
  • Page Name
  • REST Service URL
  • Data Mapping
  • Available Features
  • Add To Calendar (optional)
  • Sharing (optional)
  • Review

Input

  • Page Layout (does not appear once Page Name step has been saved)
  • Page Name
  • REST Service URL
  • Data Mapping
  • Dropdown Menu (optional)
  • Available Features
  • FastFill (optional)
  • Review

Search & Filter

  • Page Layout (does not appear once Page Name step has been saved)
  • Page Name
  • REST Service URL
  • Data Mapping
  • Available Features
  • Review