Creating Picklists for Content Conditions

October 4, 2019 Josiah Feuerbacher

Last post, we looked at how to use content conditions to drive specific content to specific displays or end-points using a single playlist. This week, we’re going to look at a couple extra options with content conditions that allow you to create picklists, or lists of conditional options.

Picklists are helpful when you have a defined set of options for any given variable. For instance, if you are driving content based on U.S. State, then you know that there are going to be 50 options (no offense to my friends in Puerto Rico, Guam, the Northern Mariana Islands, the United States Virgin Islands or American Samoa!).

Picklists can also eliminate a lot of human error. Going back to the example about US States, someone setting the conditions might not know “AK” (Alaska) vs “AR” (Arkansas). So typing out the value each time isn’t always ideal.

And finally, picklists can be used to create multiple choice options. What if you want to show the content in both Alaska AND Arizona. Well, picklists optionally allow you to select multiple values for your conditional statement.

Before we set up our first picklist, let me pause for a moment to recognize that the user flow for setting up these lists is not ideal. We’re actually looking at UI options for improving this right now. But for the time being, this is the flow that you can utilize.

OK! So you want to create a list. First step is to create the variable value at the database level. Inside Content Manager Deskop:

  1. Go to Tools > Database Settings
  2. Inside the Database Settings window, click the Variables button
  3. Inside the Variables window, create two new variables named “STATE” and “_STATE”.  The “_STATE” variable (or adding an underscore to any variable name) allows you to save picklist values or options. These options are stored as a json string.
  4. Copy the following json and paste it into the Value column of your “_STATE” variable:

            {"possibleValues" : ["AL", "AK", "AZ", "AR"]}

            The Variables window should look like this:

Then press “OK” to save the changes.

That’s it. The json contains a “possibleValues” key, with a list of options. In this case, that list is state abbreviations, but it can really be anything.


Once the picklist is defined, it will appear when selecting conditions on a content item:

By default, you can only select a single item from the list. To allow multi-select, add a key named “multi” to the json, and assign it a value of “true”. For example:

{ "multi" : true, "possibleValues" : ["AL", "AK", "AZ", "AR"]}

That’s it for this week. A quick shameless plug for our upcoming Forward Conference in October, be sure to take a look and book your trip today!

Until next time #DoYouFWI?

Previous
The Best Displays for Digital Signage Wayfinding
The Best Displays for Digital Signage Wayfinding

The success of your digital signage campaign depends on selecting the right displays—here are a few of the ...

Next Up
Digital Signage for New Buildings Pt. 1: General Considerations
Digital Signage for New Buildings Pt. 1: General Considerations

Rather than building and then implementing a digital signage system, construction companies are now includi...