Archive

Archive for the ‘Survey Creation’ Category

How To Import an IBM SPSS Data Collection (Dimensions) script into SurveyToGo

July 22, 2015 Leave a comment

            

 

Overview

 

SurveyToGo allows you to import an IBM SPSS Data Collection (Dimensions) script into SurveyToGo and then run that script on the Android just as a regular SurveyToGo script. You have a choice of whether you wish to import the entire script including the logic or only the meta data. Once an MDD script is imported the project can run on the Android tablet just like any native SurveyToGo project and afterwards the data can be exported to a matching MDD/DDF files to be easily analyzed in IBM SPSS Data Collection.

 

To import an MDD script, follow these steps:

 

Step 1: Run the import wizard

Step 2: Selecting the correct “import type” and additional options for your MDD script

Step 3: Testing the script in the emulator

 

Step 1: Running the MDD import wizard

To use the “Import wizard” rendering types follow these steps:

  1. Right click the project you wish to import the MDD script into, and select “Import Dimensions file:

  2. Locate the MDD file and click on the “Load button”:

  3. Select which type of importing you wish to perform and which routing to use for the import process – more on the “types of import” later in the guide:

  4. Finally, select any additional language and options:

  5. Now click on the “Import” button to generate the SurveyToGo script from the MDD script:

  6. If any warnings/errors come up during the import, please contact support@dooblo.com and specify the errors you received and include the MDD script in the email

  7. You can now click on Yes to open the survey.

 

Step 2: Selecting the correct “import type” and additional options for your MDD script

 

During the import wizard, you can choose the different import type to use. Each has its own benefits and might suite your specific scenario. Below find a detailed explanation of each of the types:

 

 

Here is the description of each of the import type:

 

Import Type

Description

Script code/structure can be modified

When to use?

Full
(Metadata & logic)

Both the metadata (questions, texts, languages etc) and the logic of the MDD script are imported. SurveyToGo will run the Dimensions code as-as.

No. Read only. However, you can re-sync the script with an updated MDD with one click in case you have made small modifications in the MDD original script.

When you just need the Dimensions script to run as-is on the Android device and do not wish to re-script the script. Note that while GPS will be captured for the interviews, the other QC features are not available when using this import type.

Metadata Only – Routing based

Only the metadata will be imported, questions will be added to the SurveyToGo script in the order according to the routing context selected. Any question that is in the MDD but does not show up in the routing context selected will be added at the end of the SurveyToGo survey in the “Dummy Questions” chapter. In this import type the script logic will need to be rescripted.

Yes. You can add/delete/modify any question and code as needed.

In cases where the logic of the script is simple and you wish to take advantage of the ability to add SurveyToGo QC capabilities to the script such as Silent recording or Photo capturing etc.

Metadata Only – Flat

Only the metadata will be imported, questions will be added to the SurveyToGo script one after another regardless of any routing

Yes. You can add/delete/modify any question and code as needed.

In cases where the logic of the script is simple and you wish to take advantage of the ability to add SurveyToGo QC capabilities to the script such as Silent recording or Photo capturing etc. If you do not want the questions to appear in the order of any of the routing contexts

 

 

Please note that when choosing the “Full” import type the SurveyToGo script will become “read only” meaning you won’t be able to make changes to the questions/answers/logic/structure. However you will be able to re-sync the script with an updated MDD if necessary. To do this you can switch to the “IBM SPSS Data Collection” tab of the survey and click the “Sync Script” button:

 

 

 

Language options

 

In addition to the import type, you can also specify various other options for the wizard:

 

 

Option

Description

Main Language

IBM SPSS Data Collection does not have a concept of a “main language” like SurveyToGo. So it is necessary that you select which of the languages in the MDD will serve as the “Main language” in the SurveyToGo script. The main language will be selected by default when the interview starts.

Secondary Language

Serves as the “Fall back” language in case the main language is missing a text for a specific question/answer. In this case SurveyToGo will show the text from the secondary language

 

 

Additional options

 

In addition to the import type, you can also specify various other options for the wizard:

 

 

Option

Description

Load only main language

Instructs the wizard to not add additional languages other than the main language that is selected.

Import Text As HTML

When checked, the questions text is assumed to be HTML and is treated as such. If not checked the text will be imported as-is meaning HTML markup will show.

Ignore Script Comments

Relevant to “meta-data based on routing” import types. Controls if routing items that are marked as comments will still be imported as SurveyToGo expression questions or not.

Enable Auto Advance

Controls if the auto-advance will be turned on for all single choice questions by default

 

 

Step 3: Testing the script using the emulator (Full import type only)

 

For MDD scripts that you import with the logic (Full import), you can test the actual way SurveyToGo runs the MDD code using the emulator. To do this:

  1. Click the “Run in emulator” button:

  2. Then, when the emulator comes up, a special window will appear on the right in place of the questions tree. In this window you can follow which line of MDD code SurveyToGo is now executing:

  3. You can also follow the output of the running process and any errors that were encountered in the “Log” window:

 

 

 

 

That’s it!

 

 

 

Visit us at: http://www.dooblo.net

 

 

Categories: Survey Creation

How To Use Text Highlighting Rendering Option

July 8, 2015 Leave a comment

Overview

SurveyToGo supports showing the “Text Highlighting” rendering type for the multiple selection question. When used, a custom text is shown and you can then mark the words in that custom text. This can be great for marking words that make a respondent feel a certain way.

 

 

To use the “Text Highlighting” rendering types follow these steps:

 

1. Step 1: Configure the     question type

2. Step 2: Adding HTML tags

 

Step 1: Configure the question type

To use the “Text Highlighting” rendering types follow these steps:

  1. Add a Multiple selection question to the survey, and add both the question text and the custom text in the question text are:
  2. Add the special “@@_@@” separator between the question text and the text to show to be marked:
  3. Next, set the rendering mode of the question to “Text Highlighting”:
  4. Now, you can click the “Convert Text to Answers” button to have SurveyToGo add the words you added to be marked, as answers of this question:
    which will add all the answer:

Here is the list of options relevant for this question rendering mode:

  1. Underline visible answers: this will underline all the words that the respondent can select (so if some are not selectable it will only show the relevant ones)
  2. Highlight hidden answers: this will highlight in gray any answer that is marked as hidden in the advanced answer properties. This is useful in case you wish to show the respondent which words are not selectable.

 

That’s it!

 

Visit us at: http://www.dooblo.net

 

Categories: Survey Creation

How to: Use Custom Question Rendering Packages (CQRP)

June 29, 2015 1 comment

Overview

 

In addition to the native SurveyToGo question types and renderings, you can add a question and configure it so that you will be in full control of how that question is rendered. For example, instead of showing the Scale question as usual:

 

You can instead put in a custom slider control that will look different along with some custom behavior if necessary. For example, here is a JQuery Mobile slider:

 

 

Now while the two sliders might look roughly the same, they are rendered very differently. The first is the default built-in Scale question rendering while the second is a completely custom rendered control using HTML and JQuery Mobile and is interacting with the SurveyToGo Engine to look as if it is a native question type even though it is not. The possibilities using this technique are endless and will allow anybody with basic knowledge of HTML and Javascript to create any custom question rendering that suite your specific project requirements.

In this How-to we will show you how to use an existing custom question rendering package and specify for a question that it should use the package to render in a custom way. In a follow up how-to article, we will dive into the ins and outs of how to create a custom rendering package.

 

To use an existing CQRP (Custom Question Rendering Package) the following steps are needed:

 

  1. Step 1: Attach the CQRP zip file to the question.
  2. Step 2: Configure the question to use the CQRP zip file.

 

 

Step 1: Attach the CQRP zip file to the question

 

In our example, we are going to assume that we received a CQRP package (zip file) called customSlider.zip and we will use this file throughout the steps (click here to learn how to build CQRP packages including the customSlider.zip package shown here). Click here to download the zip file if you wish to follow the steps shown here.

 

Here is how to attach the CQRP zip file to the survey:

  1. Switch to the “Advanced” tab of the relevant question, and click the “Attachments” link:
  2. Click the “New” button to open up the “Add files” window, then click the “Add files” button and find the zip file on your computer and click on “Upload” to upload the file:
    This will then attach the file and associate it with the question:

  3. Click “Ok” to close the window

 

Step 2: Configure the question to use the CQRP zip file

 

Now that you have attached the zip file, customSlider.zip in our case, you just need to configure the question to use it. To configure the question:

 

  1. On the “Advanced” tab of the question, scroll down the options until you reach the “09 Custom Question” section:
  2. Fill in the details as follows:
    1. In the Custom Question AttachmentID: customSlider.zip
    2. In the Custom Question Class Name: HTML/page1.html
    3. In the Custom Question Enabled: True|
  3. Finally, set the “Hide/Show Attach Button” to true (to hide the attachment button):
  4. That’s it! Save and test the survey!

 

Finally, here are the descriptions of the Custom Questions settings:

 

Setting Description
Custom Question AttachmentID Should contain the name of the CQRP zip file. For example: “customSlider.zip”
Custom Question Class Name Should contain the full path to the HTML file in the zip file that contains the custom rendering control. For example: “HTML/page1.html”
Custom Question DLL Path Should be empty
Custom Question Enabled True – tells the engine this question should be rendered using the CQRP modeFalse (default) – tells the engine to render the question according to its type and not use CQRP mode

 

 

 

 

That’s it!

 

Visit us at: http://www.dooblo.net

 

Categories: Survey Creation

How to: Write a Custom Question Rendering Package (CQRP)

June 29, 2015 1 comment

 

Overview

 

In addition to the native SurveyToGo question types and renderings, SurveyToGo allows you to write Customer Question Rendering Packages (CQRPs) that allow you to control how the question is rendered. For example, instead of showing the Scale question with its built in rendering:

 

You can instead create a CQRP that will incorporate a custom slider control and will look different along with some custom behavior if necessary. For example, here is CQRP package that uses a JQuery Mobile slider:

 

 

Now while the two sliders might look roughly the same, they are rendered very differently. The first is the default built-in Scale question rendering while the second is a completely custom rendered control using HTML and JQuery Mobile and is interacting with the SurveyToGo Engine to look as if it is a native question type even though it is not. The possibilities using this technique are endless and will allow anybody with basic knowledge of HTML and Javascript to create any custom question rendering that suite your specific project requirements.

In this How-to we will show you how to create a CQRP package that can be used in SurveyToGo. Click here for a guide on how to use the CQRP package (zip file) within SurveyToGo once the zip file is ready.

 

In this guide we will create a CQRP package for the custom Slider shown above. The full source code of this CQRP package along with inline code documentation can be downloaded from here: http://www.dooblo.net/downloads/MobileSlider-CQRP.zip

 

Important note: this guide assumes prior knowledge in HTML, Javascript, CSS, JQuery and JQuery Mobile. If you are not familiar with these technologies it is recommended that you first take a moment to familiarize yourself with them before continuing.

 

 

 

Step 1: Starting the project

 

We will base this guide on the free JQuery mobile slider that can be found here:

https://demos.jquerymobile.com/1.2.0/docs/forms/slider/

and a workable demo of it here: http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_forms_slider

 

 

Our first step would be to download the main HTML file along with any JS files and CSS files it uses to our local computer. For clarity, we downloaded each file(s) to their corresponding folders:

 

 

Then we put in the HTML folder a single file called “Page1.html” that has the code of the slider, but modified to reference the local folders instead of the web ones (for JS and CSS). Here is the source of the modified page1.html:

 

 

 

Note how we’ve replaces the “src” and “href” to point locally instead of to the web.

This page creates the JQuery slider and that’s it. Note how we removed the “min” “max” and “value” properties from the configuration of the slider as we will control these later.

 

At this stage you can test the control in your browser to make sure it works like you want it to:

 

 

** Important note: Please at this stage test that you can view the page correctly in your device browser (Phone/Tablet) as sometimes the browser on the tablet/phone will not support all that the PC supports.

 

 

Step 2: Adding support for the SurveyToGo Engine

 

Now that we have the basic control up and running, it is time to integrate it with the SurveyToGo engine. There are 2 integration points with the Engine:

 

Integration Point Description Implemented through
Control Loaded Called by the engine each time the control is shown so that the control can run initialization code and set its value to the last value previously set (if any) Javascript function: “STG_Loaded()” that you should add and implement. The engine will call this function as needed.
Control Value changed Each time the control has a new value selected, it should report back to the engine so that the engine can save that value as the question answer value. When the value of the control changes, you call the STG.AnswerChanged function to signal the value change to the SurveyToGo engine

 

 

Integration point 1

 

So in our case, we need to add the “STG_Loaded()” function and in there run our initialization code which consists of:

  1. (Mandatory): Setting the previously saved value of the question to be the current position of the slider.
  2. (Optional) Setting the min/max values of the slider to the ones that the user set in the SurveyToGo Studio.

 

Implementing #1: Setting the previously saved value is done by first checking if the question was answered and then retrieving the value and setting it to be the value of the control:

 

 

To interact with the SurveyToGo Engine we used the functions:

  1. STG.WasAnswered(): returns if the question was previously answered
  2. STG.getUL(): returns the UserLogic model of SurveyToGo which grants you access to all the functions of SurveyToGo
  3. STG.getCurrQues(): returns the question index of the current question.

 

We check if the question was answered and if so we retrieve the last value that was set through the “Answer()” function of the user logic.

 

Implementing #2: To set the min/max values we can reference the options set by the SurveyToGo Studio user for the question that will host this control. If you are using this technique please make sure the scripter of the survey that will use your CQRP package knows which properties to use to dynamically change your control behavior. In our case we will use the “Upper Limit” and “Lower limit” of the Scale question properties of the Studio to allow the user to dynamically control our slider min/max settings:

 

 

Here is the code:

 

 

We use the “STG.getMinRange()” and “STG.getMaxRange()” to get the settings from the Studio and then use them in the slider. Here is how the full code of the STG_Loaded function looks like:

 

 

 

Integration point 2

 

So after implementing the code necessary for Integration point 1, we now move to implement the second part of the integration, which is to indicate to the engine once the value is changed. We do this by catching the “slide stopped” event of the slider control and notifying the engine that the value changed and passing the new value:

 

 

The code uses the STG.AnswerChanged() function to notify the SurveyToGo Engine of the change in the value.

 

 

 

Step 3: Generating the CQRP zip file

 

Our final step is to create a zip file with all the content. The zip file is then used by the SurveyToGo survey designer (scripter) when configuring the question. It is important that the zip file only contains the folders necessary as it will be downloaded to the tablets / phones when used. To generate our zip file:

 

 

And after creating the zip file, we renamed it to “customSlider.zip”:

 

 

This is the CQRP package file which can be sent to the users of SurveyToGo to use.

Click here for the guide on how to use the CQRP package file within SurveyToGo.

 

That’s it!

 

 

Final productivity tip: Please note that you can take JQuery controls that do not work on mobile browsers and get them to work correctly using this free utility library: http://touchpunch.furf.com/

 

 

 

Visit us at: http://www.dooblo.net

 

Categories: Survey Creation

How To Format Questions and Answers Texts and Images

March 19, 2015 Leave a comment

Overview

 

SurveyToGo supports formatting the surveys’ questions and answers texts as well as embedding images into it in various ways.

This How-to will show you everything you need to know about formatting questions and answers.

 

Note: This implementation uses the Text Piping method. To learn more about Text piping, click here.

1. Step 1: Format question’s text

2. Step 2: Adding HTML tags

 

Step 1: Format question’s text

Changing the format of the question’s text is done through the question’s View tab.

It allows you to implement basic text formatting for part of the text or all of it such as colors, bold/underline/italic settings:

 

 

These are the formatting tools (from left to right):

Undo – Erases the last change done to the document reverting it to the older state.

Redo – Reverses the undo or advances the buffer to a more current history.

Cut – Cuts and remove marked text

Copy – Copies marked text

Paste – Pastes text that was last copied

Find and replace – Allows searching for a certain text / part of text and also replacing it with another text.

Clear formatting – Clears all the formatting settings that have been done to the text.

Font color – Changes the color of the text.

Subscript – Indicator that is smaller than the normal line of text and is set slightly below.

Superscript – Indicator that is smaller than the normal line of text and is set slightly above.

Bold – Sets the text to Bold

Italic – Sets the text to Italic

Underline – Sets the text to be underlined

Insert Picture – Adds a picture embedded in the question’s body.

Insert attachment source image placeholder – ENABLED ONLY FOR ANSWERS/TOPICS: Inserts a placeholder in the text’s body to a dynamic image insertion.

 

Viewing the HTML Source code:

You can view the HTML Source code of the formatted text automatically created bu the used tools.

To view this code, enable the “Show HTML source” checkbox on the bottom right:

 

And then switch from the Design tab to the HTML Source tab:

 

Step 2: Adding HTML tags

SurveyToGo supports some HTML tags that you can add and use to edit your questions, answers and topics texts.

The supported HTML tags are:

<br> – inserts a single line break.

<p> – defines a paragraph.

<div> – defines a division or a section in an HTML document.

<b> – specifies bold text.

<cite> – defines the title of a work (e.g. a book, a movie, etc.).

<dfn> –  represents the defining instance of a term in HTML.

<i> – specifies italic text.

<big> – defines bigger text.

<small> – defines smaller text.

<blockquote> – specifies a section that is quoted from another source.

<tt> – used for marking up keyboard input

<u> – defines underlined text.

<sup> –  defines superscript text

<sub> –  defines subscript text

<h1> – <h6> –  define HTML headings.

<img> – defines an image. Used with attributes “src”, “alt” and “id”.

<font> defines a font fromat. Used with attributes “color” and “face”.

 

To insert an HTML code with these tags to the question’s body, right click on the text section and choose Insert -> HTML:

 

In the opened window, write your HTML text:

 

Click OK and view the text in the question’s Design tab:

 

That’s it!

Visit us at: http://www.dooblo.net

 

Categories: Survey Creation

Different ways of terminating an interview

November 16, 2014 Leave a comment

Overview

While collecting data, sometimes, an interview has to be terminated or filtered out due to the survey’s logic as indicated in the questionnaire..
SurveyToGo enables you to terminate interviews during their execution in several different methods.

In this How-To we will go over the following termination methods:

  1. Canceling interviews.
  2. Filtering interviews.

Canceling Interviews

In most questionnaires there are logic instructions that require you to terminate the interview – for example during the screening process. In many situations you will not be interested in the data collected during the screening process thus indicating SurveyToGo to not save the collected data while terminating it. This is referred to as canceling the interview.

Canceled interviews will not be saved on the device hence, are not uploaded to the server and do not show in the operations grid. Canceled interviews are not recorded nor credited from your organization credit balance.

Let’s say we have a single choice question asking for the respondent’s age group:


For Example, we would want to cancel all interviews which are conducted with respondents that are not within the 18-60 age group, we would have to add it in the ‘Jump Rules’ section of the question.
How To Add Jump Rules
Add a jump rule saying that if the answer to this age group question is other than ’18-60` , Cancel the interview:


The jump rule shown above will cancel our interview and bring us back to the ‘Start’ screen before running a new survey.
If you wish to be prompt before a survey is cancelled, you can tick this feature’s checkbox through the survey’s properties tab:


Then, when a cancelation occurs, you would be prompt as following:


* ‘Yes’ will cancel the interview.
*’No’ will get back to the question and you would be able to change the answer.

 

Filtering interviews

In many surveys you will be interested in keeping the data collected during the screening process for analysis purposes.

In such cases you will be indicating SurveyToGo to save the collected data while terminating it. This is referred to as Filtering the interview.

Filtered interviews will be saved on the device hence, will get uploaded to the server and show in the operations grid. Filtereded interviews are credited from your organization credit balance.

This is more common to use in later stages of the survey, after collecting information which you would like to save. Let’s say we have a single choice question asking for the respondent’s favorite brand (after a long questionnaire including general questions, LSM, brand awareness, etc):

 


In this case, we would like to filter all interviews which the favorite brand was not `Brand 3`. Meaning, the survey will continue from this point only if the favorite brand was `Brand 3`. For other answers, the interview will terminate at that point and the data will be saved and uploaded, indicated as filtered.

Add a jump rule saying that if the answer is other than ‘Brand 3`, Filter the interview:


Regarding prompts, it is the same as jump rules, you should tick it’s feature check box in the ‘Survey Properties’ tab:



Filtered results are not included in the exporting by default, if you wish to add them to your exporting,
you should do this manually through the 
exporting wizard:

When exporting to excel, you would be able to see which subjects were filtered out.

Each value different than (-1) is filtered, and the value represents the number of question it was filtered at.


Please note this (as mentioned above):

Canceled results are not counted in your organizations credit balance.
Filtered results do count in your organization credit balance.

That’s it!

How to – Use offline mapping

July 16, 2014 Leave a comment

 

Overview

 

The location question of SurveyToGo can work in two formats, online and offline. When used in online mode the location question will use Google maps as a mapping engine. You can read more about how to use the online mapping mode of the location question here. In some cases where network connection is not available you might prefer to use the offline mode of the location question. While it requires more work to set the offline mode up it will provide you with the ability to have a full location question up and running while being completely offline. The mapping information used will be based on OpenStreetMap. To use offline maps:

 

  1. Step 1: Install Mobile Atlas Creator
  2. Step 2: Create the offline map file for the relevant area
  3. Step 3: Load the map to the SurveyToGo survey and configure the location question to use that file as a map source.
  4. Step 4: Optionally controlling the start position of the map and zoom level
  5. Step 5: Showing the map on the tablet

 

 

Step 1: Install Mobile Atlas Creator

 

If you do not have the “Mobile Atlas Creator” app installed on your PC, please first install it by following these steps:

 

  1. First, download the zip file from this location: http://www.dooblo.net/downloads/Mobile%20Atlas%20Creator%201.9.16.zip
  2. Then extract the file to your preferred location on your hard drive and start the app by double clicking on “Mobile Atlas Creator.exe”:
  3. The Mobile Atlas Creator app should start and you should be asked for the atlas format you wish, please select “Osmdroid SQLite” and click on OK:
  4. That’s it. You can now move on to the next step.

 

 

 

Step 2: Create the offline map file for the relevant area

 

To create the offline map of your choice, please make sure you have the Mobile Atlas Creator app installed and launched. If you do not have it ready, please refer to the previous step in order to download & install the app. To create the offline map, please follow these steps:

 

  1. Launch Mobile Atlas Creator
  2. If a previous atlas was loaded, first clear the Atlas by right clicking on the atlas and selecting “Clear Atlas”:
  3. Now, zoom into the relevant area you wish to create a map for. You can use the right mouse button to move around the map and the mouse-wheel to zoom in and out. Once you are around the required area, use the left mouse-button to mark a selection and then click the “Add selection” button to add this selection to the atlas. (Please read the next step about zoom levels before adding the selection):
  4. Please pay close attention to the “Zoom Level” boxes that are ticked:The higher the zoom level that is ticked the more details the offline map will include but in turn the bigger the file that will be generated. In any case do not check zoom level 18 as it will create a huge file and level 17 already includes individual street level maps. We recommend checking up to zoom-level 16 for areas which are bigger than regular cities and 15 for areas as big as a country.

    Important Note:
    If a 17 zoom-level is chosen for a big area the resulting offline map file will be huge and probably will not be able to run on the device. Please only choose zoom level 17 in case you need the individual street level maps. Zoom level 16 will have street level information as well but some smaller streets will not display.

    In case you wish to see the relevant zoom level, you can always see it on the map itself so that you can decide if you can do with a certain zoom level:

  5. If you added the selection and ticked an inappropriate zoom level, you can always change it by right clicking on the “Layer” you added and selecting “Delete”:Then, you can check/uncheck the relevant zoom level and click on “Add selection” again:

  6. Once everything is set correctly you are now ready to create the offline maps file. To do this, click the “Create Atlas” button:
  7. The app will start generating the offline maps file and you will see the progress of the file creations. The creation process might take some time as the maps will be downloaded from the internet:
  8. Once it completes, click on the “Open Atlas Folder” button to get to the file that was created:
  9. You will see a folder was created with the date and time of today, and inside the folder there is a file with extension “.sqlite”. This is the file you need to use in the next part of the guide:

    You can rename this file to any file name you wish to be more descriptive.

  10. If you need to generate a new offline maps file you can repeat the steps in this part of the guide. Just make sure to always take the file from the most recently created folder.

 

Step 3: Load the map to the SurveyToGo survey and configure the location question to use that file as a map source

 

Once you created the “Layer.sqlite” file (you can rename it to any file name you wish) you are now ready to use this file from within the SurveyToGo location question. There are 2 ways of using this file:

  1. Copy the file to the devices by yourself, then point the map question to use the already existing file.
  2. Attach the file as a survey attachments, then point the map question to use the survey attachment.

 

There are pros and cons to each approach, but our guideline is to use option #1 for any SQLite file bigger than 15MBs:

 

Approach Pros Cons
Option 1: Copy the “Sqllite” file to the devices by yourself
  • For large “Sqllite” files, copying the files to many devices will be much quicker
  • Syncing of the survey will be much quicker as the survey itself will not include the “Sqllite” file as an attachment
  • The download of the file to the devices is done manually by the customer and not by SurveyToGo
Option 2: Attach the “SQLite” file as a survey attachment
  • SurveyToGo will take care of downloading the file to all the devices that sync this survey
  • The upload of the SQLite file will take time, if this file is over 15MB of size the upload of the file might fail due to file size restrictions.
  • The download of the SQLite file will be much slower as it will use the SurveyToGo download attachments mechanism

 

We will now show you how to use each approach.

 

 

Option 1: Copy the “Sqllite” file to the devices by yourself

In this approach you simply copy the file to the device and not the name of the file. Then, in the survey do the following steps:

  1. Add a location question, then in the answers check the “Use offline mode”:

 

  1. Next, switch the offline maps source and select “New”:
  2. Now you’ll need to add a new attachment source by clicking on the “+” sign, and entering the path to the file that you copied to the device. The script to use is in the form of: “list.Add(“$ROOT$/Layer.sqlite”,“1”);” , lastly you need to give this attachment source a name and click on OK to approve:

 

  1. Finally, select the new Attachment Source name you just created from the list:
  2. That’s it!

 

Option 2:

In this approach you first attach the sqlite file to the survey and then configure the survey to use the attachment. Here is how to do it:

  1. Click the main survey and then select the “Advanced tab”, and click on the “Edit Survey Attachments” link:

 

  1. Click the “New” button to add a new attachment:
  2. Click the “Add files” button and locate the sqlite file. Then click on open to add it to the list of files to upload:

 

  1. To complete the upload click the “Upload” button:
  2. Once the upload complete you will be able to use this uploaded file when configuring the location question.
  3. First, add a location question, then in the answers check the “Use offline mode”:

 

  1. Next, switch the offline maps source and select “New”:
  2. Important note:
    This step is slightly different than in the other option, please note the change in the script syntax and do not use the script from the previous approach.
    Now you’ll need to add a new attachment source by clicking on the “+” sign, and entering the name of the attachment. The script to use is in the form of: “list.AddFromAttachment(“Layer.sqlite”);“, lastly you need to give this attachment source a name and click on OK to approve:

 

  1. Finally, select the new Attachment Source name you just created from the list:
  2. That’s it!

That’s it!

Step 4: Optionally controlling the start position of the map and zoom level

 

If you wish you can control the start position of the map and the zoom level so that the map is centered correctly when starting the map. To do this, follow these steps:

  1. Switch to the “Scripts” tab of the question and click on the “Advanced scripts” link. This will open up the global function library of this survey:

 

  1. Now, add the following function to the script library:Here is the code:

    function
    OnMapShowing(inCallback, inQuestionIndex, inIteration){

    inCallback.setMapCenter(CreateCoords(51.522202,-0.147206));

inCallback.setZoomLevel(13);

inCallback.setSatellite(false);

}


You can of course change the coordinates to the coordinates you wish to center the map on. This function will be called each time the map will show and it will make sure to center the map to the relevant coordinates and also set the zoom level to 13.

  1. That’s it!

Step 5: Showing the map on the tablet

 

Once everything is configured correctly and after the survey is synchronized to the tablet the location question will show on the tablet:

 

Clicking on the “Open Map” button will open the map and center it correctly, then allow you to pin the location to where you wish and also play with the zoom level:

 

Then lat/long of the pinned location will be captured once the OK button is pressed:

 

 

That’s it!

 

 

 

Visit us at: http://www.dooblo.net

 

Categories: Survey Creation
%d bloggers like this: