You can publish Apps with data from outside sources. Our Reference Data feature allows you to upload information like:
- Lists of customers
- Product lines
- Accounting codes
- Other data specific to your business.
You can set up these lists by importing comma separated value (also called CSV) files or using GoCanvas web services.
Two main purposes of Reference Data
- Populate a Drop Down list - Have a long list of parts or customers and don't want to hand-enter them into a drop down list? You can use a reference file that you upload with the data on it.
- Auto-Populate Fields - If you want to auto-populate a field based on a value chosen in a previous field, then this feature is for you. So if you choose a "part" from a price list you can then have the price of that part auto-populate within your GoCanvas App. On mobile, that looks like this:
How to upload Reference Data
To import Reference Data into GoCanvas, make sure you have a valid CSV file that contains a header row (first row of your spreadsheet). You'll need to remember these column headers when you map the GoCanvas App to reference this file.
We recommend that you name your fields in GoCanvas the same as your column headers so they are easy to map.
Example of CSV file in Excel
GoCanvas Tip: Leave the first row below your column headers (Row 2) blank if you will be populating a Drop Down list with Reference Data. This will prevent the first item, Widget A in this example, from becoming the default value when you load the App.
To save your data as a CSV file, change the Save as type drop down to CSV (Comma delimited) when the Save As prompt appears. Once you have the CSV file created, you need to upload it to GoCanvas and then connect it to your GoCanvas App(s).
You can upload Reference Data in two places.
Upload from within the App Builder
- Open the App Builder for the app you want to connect reference data to by clicking the Edit button.
- Find the field you want to pre-populate and select it by clicking on it. You should see the Field Settings appear on the left.
- Expand the Reference Data menu on the left.
- To add new Reference Data, click the blue plus button.
- Choose a file from your computer and upload it.
- Voila! You have uploaded a file!
Upload from outside an App
- Navigate to Reference Data & Images.
- Click on Add Data.
- Name your file and enter a Description.
- Click Choose File to select a CSV from your computer.
- Click Save.
How to map Reference Data to a field in your GoCanvas App
- Inside the App Builder, click on the field you want to connect your file to. Your Field Settings will appear on the left.
- Click on the Reference Data menu on the left to expand it.
- Choose the file you have uploaded from the first drop down.
And then choose the column of data from your file that you want to appear in this field. In this case it is a Drop Down field so your user will be able to choose from the list of customers in the Customer Name column of your reference data file.
Whenever you update this file then it will be pushed out to your mobile users so everyone has the same choices available in this Drop Down field.
How to make fields auto-populate with Reference Data
After mapping your initial field to reference data, you may want to have additional fields automatically populate based on the selected value. Using the example above, we will automatically populate additional fields so your mobile user does not have to type them in manually.
- Select a field in your GoCanvas App that you want to auto-populate for your user. In this example we are choosing the Address field.
- Expand the Reference Data menu. You'll see these settings:
- Choose the same file you uploaded before. The address information is on that file.
- Reference Column - Choose the column that contains the address information. I have conveniently named my fields the same as the columns to make this easy on me.
- Reference Screen - This is the screen where the field is located that is triggering the auto-population. In this case it is the same screen you are on (Job Information). But you can auto-populate fields on subsequent screens using reference data.
- Reference Field - Now choose the field that will trigger the auto-population which is Customer Name.
If you read the menus from the bottom up, it will help you understand this.
"When I choose something from the Customer Name field that is on the Job Information screen then the Address from the Customer List file will appear."
Repeat the above steps for all of the fields you want to auto-populate for your users.