I'm trying to toggle the disabled flag based on values in two different fields. How would you do that. Here's my example
{{add_Experience.value == 'New'}} || {{add_Name.value =='Unlicensed Assistant'}}
evaluates to true || false
I'm hoping it's just syntax
justin
January 6, 2021, 11:02pm
#2
Hey @scottcrowley ! Yep, depends on what your condition is. true || false
evaluates to true
, while true && false
evaluates to false
.
I tried this same logic in a transformer and worked as expected. If I put in in the disable field of the component it doesn’t evaluate the logic just builds a concatenated string “true || false”
I guess the answer is to use the transformer?
justin
January 8, 2021, 3:52pm
#4
Ah, it’s because you have a couple of extra curly brackets - it should be {{add_Experience.value == ‘New’ || add_Name.value ==‘Unlicensed Assistant’}}
1 Like
Thanks Justin, still learning!
1 Like
justin
January 8, 2021, 5:38pm
#6
That’s what we’re here for