When creating a new field in Message, there are 7 field types to choose from. Certain field types have formatting restrictions, and may have advantages when running searches or scheduling messages. The field types are as follows:
String
String fields are open text values and have no formatting restrictions. They can contain letters, numbers, spaces, special characters, etc. This is the most common type of data field.
Boolean
Boolean fields contain true and false values. They appear as a check box in the profile. Optionally, boolean fields can allow blank values; in this case, they appear as a dropdown menu in the profile.
Numeric
Numeric fields are restricted to whole numbers. Numeric fields can be searched via mathematical comparators such as >, <, etc.
Float
Float fields are restricted to numbers with decimals up to 2 decimal places. Float fields can be searched via mathematical comparators such as >, <, etc. Float field values are always in the format of X.XX. If a value is below 1, the float must contain the leading zero (i.e. 0.37).
Date
Date fields are restricted to date values formatted YYYY-MM-DD. Date fields can be used for scheduling messages (i.e. birthday at 10am).
Time
Time fields are restricted to time values formatted HH:MM:SS. Time fields can be used for scheduling messages (i.e. 4/19 at appointment_time).
DateTime
Dates and times can also be combined in a DateTime field. DateTimes are formatting is restricted to YYYY-MM-DD HH:MM:SS. DateTimes can be used for scheduling messages (i.e. appointment_reminder).
Why use a field type other than string?
String fields are flexible, but they cannot be used to determine message send dates and times, and have limited search capabilities. A GPA field, for example, can be searched via equals or contains if it is string field. If it is a float field however, it can also be searched via greater than less, than, etc. Date values, for example, can only be used for scheduling messages if they are stored in a Date field rather than a string field.
Comments
Please sign in to leave a comment.