Handlebars/JS help - Table conditions #14781
Unanswered
timmehrees
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I suspect this issue is purely my inexperience with handlebars/JS (disclaimer: not a programmer, i'm an ex sys admin) - But after an hour or 2 of searching, i've got nowhere.
In short, I'm trying to change the background of "cell 1" red, if it is more than or equal to "cell 2". My fields are actually called 1 and 2 (which may be causing issues....)
I think my issue is how I am referencing the fields using JS or handlebars - I've tried {{ row.2 }} and return $("row.2") for each respective language - Interestingly, the JS preview screen shows the correct value, the handlebars preview just shows {{ row.2 }} (I think thats my fault with the field name).
The result is the entire column is Red - not just the individual cells that should be - and if I change it to less than or equal to there is no change. I suspect it is returning NULL - so unable to compute.
Can anyone point me in the right direction, and sorry if this is a stupid question and i've missed the basics of handlebars/JS
Thanks again.
Beta Was this translation helpful? Give feedback.
All reactions