Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column

Let's take a look at populating a dynamic pick lists (drop downs) using a business rule. It’s a very common scenario and, with frevvo, you can use business rules to dynamically initialize the options (choices) in a pick list from a Google Sheet. We’ll use this sample Google Sheet to discuss. It has a row for each employee: First Name, Last Name, Employee Id.

Column
width240px

On This Page:

Table of Contents

Step 1: Obtain an access token

This is a one-time step.

...

Open your web browser and login to your Google Account

...

Go to:

  1. Live Forms Online Cloud customers: https://app.frevvo.com/google/consent

  2. Live Forms In-house customers: http://<your frevvo server domain name>/google/consent

...

Insert excerpt
Obtain an Access Token
Obtain an Access Token

Step 2: Add the Business Rule

Use a rule to read information from the Google Sheet and populate the employee pick list. Here’s the relevant business rule:

...

  1. It’s triggered by clicking on the Connect button.
  2. We setup headers and a query using your access token and spreadsheet key (the long ID in the URL of the Google Sheet).
  3. Run the query – perform an http.get() and eval the results.
  4. Parse the results into an array. The array elements are “hagen=Walter Hagen” etc.
  5. Set the options to the array.

Step 3: Try it yourself

You can try it yourself by clicking this link or clicking on the image.

...