frevvo Latest - This documentation is for frevvo v10.0. Not for you? Earlier documentation is available too.
Let's take a look at populating a dynamic pick lists (drop downs) using a frevvo 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.
If you do not have an access token for your Google Account, perform this one time step.
Follow these steps to obtain your Google Account token. Login to your Google Account Go to: Cloud customers: https://app.frevvo.com/google/consent Click Allow if you see a screen like the one below (Google often updates their UI so this may differ from what you see). Copy the access token. Save it to a safe location, you will use it when configuring your forms/workflows.
Login to your Google Account
Cloud customers: https://app.frevvo.com/google/consent
Click Allow if you see a screen like the one below (Google often updates their UI so this may differ from what you see).
Copy the access token. Save it to a safe location, you will use it when configuring your forms/workflows.
Use a rule to read information from the Google Sheet and populate the employee pick list. Here’s the relevant business rule:
Escape the slash characters in your OAuth token with a backslash in the rule below like this: OAuth21\/\/<###...>
The column name on a Google sheet must match the control name. The matching is case-insensitive and any spaces in the column name are ignored. A control named "FirstName" matches a column header "first name." However, references to Google Sheet columns in your rule must be lower case and cannot contain spaces. The correct reference for this example is "firstname."
You can try it yourself by clicking this link or clicking on the image.
Here is another example of a simple rule that populates a Checkbox or Radio control named Colors with color options from a Google Sheet.
Use this rule to populate the Checkbox/Radio options with the colors Red, Blue, Green and Orange. Note this rule uses http headers to provide authentication information. The Google Sheet is identified by the spreadsheet key and the worksheet name is passed as a query parameter. This is the recommended approach.
Replace <Google User ID> and <Google Account access token> with your information in the user and password headers.
Change <your spreadsheet key> to the key for your Google Sheet and <the name of the worksheet> to reflect the name of the worksheet tab in your Google Sheet.