Hey team,
This might be a super simple thing but I can't seem to get around it.
I have a form where I want the background colour of a label to change based on the input value of a rating box. I've got it triggering the script on change of the input field (via a javascript query). It looks like the query is running based on the debug window but none of the expected results are happening. This is my code:
var l = likelihood.value;
var c = consequence.value;
var ca = consequenceAfter.value;
var la = likelihoodAfter.value;
if(la == 5 || la == 5){
riskLevel.style.background = "red";
riskLevel.setValue("High");
}
Basically if consequenceAfter or likelihoodAfter is set to a 5 I want it to change the background colour of a label to red and change the value text to "High".
What am I missing? Also back when I used to do normal development stuff (it's been a few years so I'm rusty) I always used to use alert("test") in places to see if it got that far and to troubleshoot... but it doesn't look like alerts are working? Is that a thing in retool? Maybe I should get it to send a message to the dev console instead.