Login    Sites MenuBlueStep

BlueStep Platform Support

RelateScript
Outline full outline 
Overview 
Data Types 
Operators 
Statements 
Functions 
Data Conversion 
String Functions 
HTML/CSS/JavaScript 
Array Functions 
Date/Time Functions 
Mathematical Functions 
Advanced Functions 
Restricted Functions 
Working with Relate Data 
How Formulas Work 
Related Topics 

Data conversion functions convert one type of data into another type of data.  They are as follows:


There are many data types in Relate, and Relate will not implicitly convert between them. For example, let's say you have the client define which form you're working with. The options are Meds, Interventions, and Surgeries. You want to put the chosen form into a variable so you can do searching on it. You might think you can do something like

formType = // string taken from a user-selected list value
chosenForm = meds
if (formType == 'interventions') chosenForm = interventions
if (formType == 'surgeries') chosenForm = surgeries
chosenForm.addSearch("date", "<=", curDate())

This will throw an error because the forms are of different data types. If Meds had an ID of '123' and Surgeries an ID of '456', their data types would be ReadOnlyFormEntry_123[Integer] and ReadOnlyFormEntry_456[Integer] respectively.