Im trying to pull options which are key set from a MAP and display then in the Preferences page for users to select. However, I always get no options when I install the app, thought I can throw them in logs before. Here’s my Prefence page
preferences {
page(name: "credentials", title: "Welcome")
page(name: "locationList", title: "Location for this App", nextPage: "success", content:"locationList")
page(name: "success")
private locationList(params=[:]){
def locations = locationFound() // Executes locationFound() that returns a map of locations, example [Home:098765, Office:123456]
def options = locations.keySet() ?: [] // log.debug options = [Home, Office]
return dynamicPage(name:"locationList", title:"Pulling up the Location List!", install: true, uninstall: true) {
section("Select from the following Locations") {
input "selectedLocation", "enum", required:true, title:"Select the Location", multiple:false, options:options
}
}
}
At this point, Im expecting my preference page would give me both the options to select. However I get a message “No available Options”. Am I doing something weird while defining the options in dynamicPage.