Skip to content

How to make a table field with dynamic dropdown and force unique values #266

Locked Answered by ansibleguy76
ansibleguy76 asked this question in Q&A
Discussion options

You must be logged in to vote
fields:
  - name: portPairs
    type: enum
    outputObject: true
    values:
    - hostType: ANY
      primaryPort: CL1-C
      secondaryPort: CL2-C
    - hostType: Windows
      primaryPort: CL1-A
      secondaryPort: CL2-A
    multiple: true  
    placeholderColumn: "*"
  - name: flat
    type: expression
    runLocal: true
    expression: $(portPairs).flatMap(({ primaryPort, secondaryPort }) => [primaryPort, secondaryPort])
  - name: filtered
    type: expression
    runLocal: true
    ignoreIncomplete: true
    expression: ( (a1=[],a2=[]) => { return a1.filter(x => !a2.some(y => y.storagePort === x))} )($(flat),$(serverPaths)) 
  - name: serverPaths
    label: Server WWN Mapping
    t…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ansibleguy76
Comment options

You must be logged in to vote
0 replies
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
1 participant