Can someone tell me where the error in my code is? I keep getting the following error message: "ERROR: Error syntax error (line #4) in formula: function wrapper() { If("Hypertension"=="") return "Diabetes"; else return "Diabetes-Hypertension"; } wrapper();" If("{!study_sub_category#value}"=="") return "{!study_category#value}"; else return "{!study_category#value}-{!study_sub_category#value}";
Please use Formula debugger.
the error message I listed in my question was the output in the field when I run Firmula Debugger. unless I am running it wrong
Please supply full output from Formula debugger.
Whem I edith the field there is a button in the bottom right hand corner that says "Debug formula". When I click on that a opo-up window opens with an Object Selector window that shows a list of the record and one of the columns is the field with the following error message listed in the field:
ERROR: Error syntax error (line #4) in formula: function wrapper() { If("Hypertension"=="") return "Diabetes"; else return "Diabetes-Hypertension"; } wrapper();
Please check line #4 as error message suggests.
I've noticed that you're using upper-case "I" in "if", this is not legal in JavaScript.
Marking as solved