webalo key-value pairs

15
Webalo – Key-Value Pairs Adding a key-value pair to the input of a DB task Webalo, Inc. Customer Support

Upload: others

Post on 17-Feb-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Webalo – Key-Value Pairs

Adding a key-value pair to the input of a DB task

Webalo, Inc. Customer Support

Introduction

Oftentimes the value in your database that you want to search on or update is not

recognizable to the end user running the DB app on their phone. The ‘key value’ as it is

often referred to is the term or number the DB recognizes. The ‘Display Value’ is the label

you can assign to the key value to ensure your end users are able to run your apps

effectively.

Below are the steps to create a ‘Key Value Pair’ in Webalo.

The table we are going to work with in our DB is a list of offices. As seen here:

In the above table we want to search by office, but none of the values that are stored in that

column are recognizable buy an end user. In a separate spreadsheet I have the names that

we would like to appear for each office. Seen here:

There are two steps to setting up a key value pair in Webalo. You must first create a data

format drop down of the key values from your database. The second step is to add the DF

drop down and then the values you want shown for the keys. We will quickly walk through

creating a data format drop down. For full instructions on this process see ‘Database

Lesson 2’ found here: https://support.webalo.com/training.php

Log into you Webalo account. Click ‘Fine Tune Your Connections’ then click ‘Add or Edit

Data Formats’. You should see the following screen:

Click the ‘Create’ button on the bottom of the screen.

You will then need to name your DF. Since this will be a drop down it’s a good idea to

append whatever name you give this DF with ‘drop down’. Since we are building a DF for

our Offices, I’ll call it ‘Office Drop Down’.

Then hit ‘Next’.

Here you will begin to create the DF for your drop down. On the screen below, hit

‘Add’.

The name of your data format should be something you can associate to the app you will be adding this to. Since this is a list of offices, I’ll use that as my data format name. You’ll also need to choose ‘Choice’ as the type of data format. Seen here:

Once you are ready, hit ‘Next’.

On this step you’ll add the allowed values for your drop down. As we saw earlier this is a

list of offices. As you add values they will show up on the screen. Below I have two offices

added. To add values for your drop down, hit the ‘Add’ button and copy and paste or type

in your key values.

Continue to add your allowed values until you have them all entered and then hit ‘Finish’ two times and then ‘Deploy Changes’.

Now we will add the DF to the input of the app and create the display values we want to show on the device for the offices. This tutorial will be editing a preconfigured app. If you are building the app from scratch the steps are the same.

On the Configure Database Query step (seen below) you will add the DF to the input and add the key value pairs. Steps follow.

Highlight the input parameter you wish to add the KVP to and click ‘Edit Parameter’.

On the Edit Query Parameter popup, choose the ‘Custom data format’ option and then scroll to and highlight the DF you created in the first step. Seen here:

Click ‘OK’.

Back on the Configure Database Query page, click ‘Customize Input Field’ on the lower right hand side of the screen.

That will bring up the ‘Edit Field Display Rules’ step. This page contains many functions to control the inputs to your applications. For this tutorial we will use the ‘Edit Formatting’ option. Click the ‘Edit Formatting’ button in the middle of the screen. Seen here:

This brings up the Enumeration Widget that allows you to add the display values to your

key values. Seen below before adding any values:

Click the Display Value side to edit the field and add your values.

Click

here to

edit

Below is the same screen with the display values added.

Click ‘OK’. ‘Finish’ twice and then deploy your changes.

When you run the application you’ll see the display value names showing up in the drop down. Seen here:

But the results will be based on the key value. Seen here: