Set hidden value based on conditions

I am looking to set the value of a hidden field to be one value if several conditions are met and if not another value. Can this be done without special functions & triggers?

Was hoping to use something like the the dmx-show options, for these the user gets a visual Green Check or Red X…

Hello,
Please provide an example of the conditions you want to check.

“cycletimeinput.value > prdprofile.data.testparms[0].revolutionrequirementmin.toNumber() && cycletimeinput.value < prdprofile.data.testparms[0].revolutionrequirementmax.toNumber()” && “oppflowinput.value >= prdprofile.data.testparms[0].flowrequirementmin.toNumber() && oppflowinput.value <= prdprofile.data.testparms[0].flowrequirementmax.toNumber()” && “stoppressinput.value <= prdprofile.data.testparms[0].pressurestoprequirement.toNumber() && stoppressinput.value > 0”

So, that’s the whole condition? What should happen if it’s true, and what if it’s false?

sorry if all is true the the field value = “TestPassed” if not then value = “TestOpen” something along these lines.

Please try this:

dmx-bind:value="((cycletimeinput.value > prdprofile.data.testparms[0].revolutionrequirementmin.toNumber() && cycletimeinput.value < prdprofile.data.testparms[0].revolutionrequirementmax.toNumber()) && (oppflowinput.value >= prdprofile.data.testparms[0].flowrequirementmin.toNumber() && oppflowinput.value <= prdprofile.data.testparms[0].flowrequirementmax.toNumber()) && (stoppressinput.value <= prdprofile.data.testparms[0].pressurestoprequirement.toNumber() && stoppressinput.value > 0)) ? 'TestPassed' : 'TestOpen' "

that works, thanks for the help. was not sure the flexibility of the dmx-bind actions…

1 Like