Import Export Best Practices

Import Export Best Practices

 

Overview 

This guide will step you through the best practices for importing/exporting an app across environments.  It is common that you will need to import and export multiple times across environments over the course of an implementation, and while this guide is best in most cases, there may be one or two changes that customize it to your specific needs.  The important thing is consistency; find the approach that works for you within your environment and stick with it. 

This guide is for importing an entire app across environments.  Importing parts of an app, for example a particular screen, is possible but complicated and with varying results.  Do so at your own risk and be sure to follow the below section: Before you export/import first.

 

 Before you export/import

 

While exporting and importing works very well if you follow the steps below, it is always helpful to have a backup before you overwrite an environment.  In most cases it will be fine to take an export from the destination environment prior to importing as a backup.  In some cases, such as an import into production, it makes sense to take a database backup in addition to be extra safe.

 

To take a backup export of your destination environment, perform the following steps. This is only necessary if you are updating an existing app. Skip this step if you are doing a fresh import into a new environment:

 

    1. Connect to the destination environment with AppStudio.  Make sure your AppStudio version is consistent with your database version; an AppStudio version older than your database may not be aware of all the fields in your database.
    2. Open the app that you are going to be updating with the import
    3. Select File > Export
    4. Check off all the boxes, this will ensure you are exporting the entire app and all of its properties.
    5. Click the Export button at the bottom, and save your file somewhere safe.

Import1.png

 

  Exporting from your source environment 

Now that you have backed up your destination environment, it is time to take an export from your source environment.  Note that when you import across environments, all app properties will get overwritten, thus at some point you will need to update the properties to what you want for your destination environment.  If you are importing to production, and you want to minimize the change window, change these settings in the source environment before doing the export.  If downtime doesn’t matter, feel free to update in the destination environment after the import.  Common app properties that may be different across environments are: 

  • Server > Log level
  • Server > Send scripts to iOS in config
  • Security > Client Auto Login

Once you are ready to export from the source environment, perform the following steps:

  1. Connect to the source environment with AppStudio.  Make sure your AppStudio version is consistent with your database version; an AppStudio version older than your database may not be aware of all the fields in your database.
  2. Open the app that you want to take an export of
  3. Select File > Export
  4. If this is your first export/import into the destination environment, check off all the boxes, this will ensure you are exporting the entire app and all of its properties.  If the app already exists in the destination environment you may want to uncheck the following:
        • Mobile Users (unless you want to delete the existing users in the destination environment and add the ones from the source environment)
        • Administrators (this controls the sql logins that have access to an environment.  If these differ across environments importing from one to the other could break access for the destination environment’s users)
        • Roles (roles define what each administrator has access to within an environment)\

5. Click the Export button at the bottom, and save your file. 

   Import_2.png     OR         Import_3.png

 

Importing to your destination environment

 

You are now ready to import into your destination environment.  Make sure the .pyxml file that was created during the export process is accessible in your destination environment.

 

Follow these steps if this is the first time you are importing into the destination environment.  If the app already exists in the destination environment, skip to the next section: App Already Exists in the Destination Environment.

 

  1. Check the AppID of the application in the source environment                                                                                                                                                                                       Import_4.png
  2. Connect to the destination environment with AppStudio.  Make sure your AppStudio version is consistent with your database version; an AppStudio version older than your database may not be aware of all the fields in your database.
  3. The AppID should always match across environments.  If there are no apps in the destination environment, the first app created will have an AppID of 1000.  If apps already exist the AppID created will be one higher than the highest existing application.  Create an app in the destination environment with the same AppID as the app you are importing by clicking the Create New Application button one or more times.

NOTE: If using Packaged Config and importing to a production environment it is extremely imported to follow this step.  DO NOT import the application directly instead of creating an empty new application first and importing over it, or the GUIDs will not match and packaged config will break down the line. (See #40284 in Jira for more details)

  1. Open the application with the correct AppID.
  2. Select File > Import > Application Data.
  3. Select the .pyxml file that got created when you did the export.
  4. If you followed the export steps all appropriate boxes will be checked.  Note that some items, such as Global Scripts and Localization, will not appear if you did not have any of those items configured in the source environment. 
  5. Click Import to import the application on top of the empty one you just created.                                                                                                                                           Import_5.png                                                                                                                                                                                                                                                             
  6.  Since this is your first time importing the app into the new environment, update any settings, such as Log Level, Data Sources, etc. to match the new environment.

App already exists in the destination environment.

1. Check the AppID of the application in the source environment.

 Import_6.png

 2. Connect to the destination environment with AppStudio.  Make sure your AppStudio version is consistent with your database version; an AppStudio version older than your database may not be aware of all the fields in your database.

3. The AppID should always match across environments; open the app you want to import over and make sure it has the correct AppID.

4. Select File > Import > Application Data.

5. Select the .pyxml file that got created when you did the export.

6. If you followed the export steps all appropriate boxes will be checked.  Note that some items, such as Global Scripts and Localization, will not appear if you did not have any of those items configured in the source environment, this is not a problem since there was nothing to import anyways.  Note that if you expand the data sources the “Use imported connection parameter values” is unchecked; since the app already exists in the destination environment you probably do not want to overwrite the connection parameters, if you do, check those boxes. 

Click Import to import the application.

 Import_7.png

7. If you did not do so prior to the export, update any settings, such as Log Level, Auto Login, etc. to match the new environment.

 Other Considerations

 

  • Remember that if you are importing from one environment to the other it may not be just the configuration that needs to be migrated.  Update the following on the destination environment app server if necessary:
    • New or updated plug-in dll’s
    • Updated REST/Stored Proc plug-in XML files
    • Updated web.config settings

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk