If my capsule has a requirement to allow a user to select from a set of fixed values represented by an enum
, how can I do that in Bixby?
Asked
Active
Viewed 58 times
0

BixbyDevSupportOne
- 795
- 5
- 12
1 Answers
0
We are going to represent the fixed values as an enum
enum (FixedValue) {
symbol (ONE)
symbol (TWO)
symbol (THREE)
symbol (FOUR)
}
The Action file will look like this
action (GetFixedValue) {
type(Search)
description (Allow user to choose a value from the set of fixed values)
collect{
input (fixedValue) {
type (FixedValue)
min (Required) max (One)
prompt-behavior (AlwaysElicitation)
default-init {
intent {
goal: FixedValue
value-set {FixedValue {FixedValue(ONE) FixedValue(TWO) FixedValue(THREE) FixedValue(FOUR) }}
}
}
}
} output (FixedValue)
}
The Javascript file for this action is as follows:
module.exports.function = function GetFixedValue (fixedValue) {
return JSON.stringify(fixedValue)
}

BixbyDevSupportOne
- 795
- 5
- 12