Scripts used in this tutorial:
this.rawValue = parseInt(Question1.rawValue) + parseInt(Question2.rawValue) + parseInt(Question3.rawValue) + parseInt(Question4.rawValue);
One of my YouTube subscribers recently posted a question related to “bound” data fields. This reminded me of how data bound fields are often susceptible to being populated with null values if the database is empty. Here is a little function I wrote to remedy this possibility:
var v_Space = ” “;
if (v_String == null)
So, all we are saying here is that if the passed in value (v_String) equals null then return a value of ” ” (one space). If not, then just return whatever non-null value is there. This small function is used to “test” the string values of data that is passed from a database to a bound field.