Formula Help

Posted by Rollbase User on 07-Sep-2012 14:16

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}";

All Replies

Posted by Admin on 08-Sep-2012 01:16

Please use Formula debugger.

Posted by Admin on 08-Sep-2012 01:19

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

Posted by Admin on 08-Sep-2012 01:20

Please supply full output from Formula debugger.

Posted by Admin on 08-Sep-2012 01:26

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();



Posted by Admin on 08-Sep-2012 01:35

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.

Posted by Admin on 10-Sep-2012 15:24

Marking as solved

This thread is closed