New "contains" calculation for Text Calculations
You can now add in a text or option calculation to specify if the answer to a question contains specific characters or words
The image in the example here shows that the activity at the time of injury can be selected as "Running" or "Running with Ball". To determine if "Running" (either Running with or without the ball) is the activity at the time of injury, you can now use the "contains" function in a Text Calculation or an Option calculation.
Performing a "Contains" search will return 1 (True-search term met) or 0 (False- search term not met)
Writing a Contains Calculation
A contains calculation is written as follows:
contains (Field Name, "Search term"), e.g. contains( Activity at Time of Injury, "unning")
N.B. we have used "unning" NOT Running as the search is case sensitive and running is written in both upper and lower case in the Activity at Time of Injury Field.
The Contains Raw Output
The output for a contains field is:
oOu can also use the Contains in an If/Then equation to return text or options
Be careful of case sensitivity; you must type in the exact case of the word as the search will not return anything if it is not exact
The example here shows that "running" was added as the search term and not "unning", and it is NOT calculating correctly when "Running" is selected.
Make sure you test that you have set up the calculation as you require it.