1

I want to set two parameters in one capsule's inuput-view file. What should I do?

In my capsule, there has a function which need two parameters and these two parameters is required. When user say one case, if this case doesn't including these two parameters, bixby will hints user input these two parameters. In the previous version I created two input-view file and one input-view file including one parameter, but now I want to set these two parameters in one input-view file, so what should I do?

In action file:

input-group(ContactAndText){
    requred(OneOrMoreOf)
    collect{
       input(contact){
         type(Contact)
         min(required)
         max(one)
       }
       input(text){
         type(Text)
         min(required)
         max(one)
       }
   }
}

In input-view file: I do not know what should I do?

In action file I set a input-group(ContactAndText), this input-group including these two parameters(contact and text), but I do not know what should I do in input-view file.

Timisorean
  • 1,388
  • 7
  • 20
  • 30

2 Answers2

0

I don't think having an input view for two separate objects/structures will work, however having an input view for your input-group might work. I believe can use the match pattern match: [action name]~[input-group name] (match: action~ContactAndText) to match the input-group specifically.

If this doesn't work, I would recommend either using two separate input views, one for contact and one for text, or you could create a new structure ContactAndText: make it extend Contact and make it have a text property. Then, you can have the input view match the ContactAndText structure.

0

An easier solution:

Add a new structure

structure (ContactAndName) {
  description (a structure to hold both)
  property (contact) {
    type (Contact)
    min (Required) max (One)
  }
  property (text) {
    type (Text)
    min (Required) max (One)   
  }
}

In action model

input(contactAndText) {
  type (ContactAndText) 
  min(Required) max(One)
}

You can then implement a view with match: ContactAndName