Skip to content

How to do dynamic maxValue Expressions in AnsibleForms #269

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

You must be logged in to vote
fields:
  - name: mymax
    type: number
    default: 5
  - name: ishigher
    type: expression
    runLocal: true
    expression: ((x,y)=>{ return y>x })($(mymax),$(myvalue))
  - name: myvalue
    type: number
    validIfNot:
      field: ishigher
      description: that's too high.
    default: 3

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MarcosLealSierra
Comment options

Answer selected by MarcosLealSierra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants