cancel
Showing results for 
Search instead for 
Did you mean: 

String value in list with options

AMacourek
Deputy Chef III
Deputy Chef III

I have a list with the following schema:

image.png

I would like to have the dataType be a list of values to pick from when adding items to the list.  How can I achieve this?

 

1 ACCEPTED SOLUTION

gary1
Star Chef I
Star Chef I

First, change the control_type to "select" or "multiselect"

Then, add a "pick_list" key. For the value, make an array of nested primitive arrays with two items. In each nested array, the first item is the label, the second item is the value that passes for each option.

Like this:

[
  {
    "control_type": "select", ## or multiselect
    "label": "Dropdown",
    "name": "dropdown",
    "type": "string",
    "optional": false,
    "pick_list": [ 
      ["one",1], 
      ["two",2],
      ["three","hello"]
    ]
  }
]

More info here:

https://docs.workato.com/en/developing-connectors/sdk/sdk-reference/schema.html#attribute-descriptio...

And here:

https://docs.workato.com/en/developing-connectors/sdk/sdk-reference/picklists.html

View solution in original post

2 REPLIES 2

gary1
Star Chef I
Star Chef I

First, change the control_type to "select" or "multiselect"

Then, add a "pick_list" key. For the value, make an array of nested primitive arrays with two items. In each nested array, the first item is the label, the second item is the value that passes for each option.

Like this:

[
  {
    "control_type": "select", ## or multiselect
    "label": "Dropdown",
    "name": "dropdown",
    "type": "string",
    "optional": false,
    "pick_list": [ 
      ["one",1], 
      ["two",2],
      ["three","hello"]
    ]
  }
]

More info here:

https://docs.workato.com/en/developing-connectors/sdk/sdk-reference/schema.html#attribute-descriptio...

And here:

https://docs.workato.com/en/developing-connectors/sdk/sdk-reference/picklists.html

Thanks.  I must have just had the syntax wrong