Script Select Option

Hi all, i‘m trying to use a select option field in a script, without any sucess. Does anyone know how I can use the option in a choose condition in the script?


fields:
 persons:
    selector:
      select:
        options:
          - Person 1 
          - Person 2
          - Person 3 
        multiple: true
    name: Personen 
    required: true
    default: 
        - Person 1
    description: Person wählen

sequence:
    - choose:
        - conditions: 
            - condition: template
            value_template: {{ persons[0] }}
        sequence: []

There are a couple issues with the indents and the template is missing quote marks.

fields:
  persons:
    selector:
      select:
        options:
          - Person 1 
          - Person 2
          - Person 3 
        multiple: true
    name: Personen 
    required: true
    default: 
      - Person 1
    description: Person wählen
sequence:
  - choose:
      - conditions: 
          - condition: template
            value_template: "{{ persons[0] }}"
        sequence: []
1 Like