Mobilise a new field

We will now mobilise a new field. In this example we will actually mobilise an existing field in the MC_Time_Expense__ap table so that it can be used by the client application. This is done through the Add Table Column wizard that’s available on the App Data record specific for the version of the data that is applicable for our development user.

  1. Click on the Mobile Applications tab
  2. Choose the Seed 001 – Time & Expense application
  3. Click on the Dynamic Version entry listed there. There should only be one at this stage. Once viewing the Dynamic Version record you should notice that it’s Status is set to Developing. Going forward this status is used to protect production builds etc from accidental changes.
  4. Within the Dynamic Components Versions section click on the App Data version. We do this as we want to modify the application data associated with this current Dynamic Version. We are now faced with the App Data Version record. This tells us which Mobile Applications are using this as well as which tables are defined in it.
  5. We want to mobilise a new field in the MC_Time_Expense__ap table, so click on the Table Version for that table. On the next page we see the record for this table at one particular version. At the bottom of the page we can see the Table Columns, there should be 23 currently listed (meaning mobilised).
  6. Now click the Add Table Columns button. This will show a list of columns already available for us to use (or add a new one).
  7. In our example we are going to mobilise the existing column Expense Type. Select this entry.
  8. We also need to specify some permissions and conflict settings. Set all the CRUD settings to Yes.
    Screenshot of Setting new field CRUD settings
  9. Click Create Table Rows. You are returned to the App Data Detail page and we should see that our table now has 27 records.
Screenshot from 2015-01-28 22:20:20

We can now run our application up again on the Platform Emulator, and use the Mobile Table Inspector tool in the Settings area to inspect the contents of our encrypted SmartStore. The password for the Admin Functions is “123” as a default. This will be updated following Closed Beta. As you can see from the screenshot below, the new field mobilecaddy1__Expense_Type__c is available in the MC_Time_Expense__ap table (note the package prefix on the field name).

Screenshot from 2015-01-06 14:48:14

Now that we have mobilised our new field the next step is to update the client code to make use of it.