Forum Discussion
MarkShnier__You
Qrew Legend
3 years agoYou are on track but need to be sure that you are dealing with a text field type and also take care to not have components of the formula which calculate to null as that will cause the whole result to be null.
var text PT = ToText([Badge: Patient Type]); // use a formula variable here for tidiness
IF(Contains($PT, "Inpatient"), 5,0) // note that the "else" is zero so as not to be null
+
IF(Contains($PT, "PF-Hospitalist"), 2,0)
+
IF(Contains($PT, "PF-Surgery"), 2,0)
+
etc....
etc ....
+
IF(Contains($PT, "Pain"), 2,0)
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
var text PT = ToText([Badge: Patient Type]); // use a formula variable here for tidiness
IF(Contains($PT, "Inpatient"), 5,0) // note that the "else" is zero so as not to be null
+
IF(Contains($PT, "PF-Hospitalist"), 2,0)
+
IF(Contains($PT, "PF-Surgery"), 2,0)
+
etc....
etc ....
+
IF(Contains($PT, "Pain"), 2,0)
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------