Overview
The Create Custom Field command allows you to create a new custom contact data field in which to store data related to your contact.
Arguments
The Create Custom Field command requires the following arguments: Command, Field Name, Field Type, and Description.
cmd=customfieldcreate&fieldname=age&fieldtype=0&description=Age
The command is ‘customfieldcreate', and the new, empty Number custom field will be named ‘age’.
The Create Custom Field command supports the following arguments:
Name |
Req? |
Description |
Argument |
Command |
Yes |
Defines the command to use. |
cmd=customfieldcreate |
Realm |
|
Name of the realm to run the command. This is optional and only necessary when submitting files to a parent realm in order to manipulate a child realm. |
realm=[realm_name] |
Field Name |
Yes |
Name of the new custom field. Please note that custom fields are case sensitive and long names are prone to error. Many special characters, such as space, are not allowed. |
fieldname=[custom_field_name] |
Field Type | Yes |
The type of value to store in the field. Field types include: number = 0 text = 1 date = 2 large text = 3 unicode text = 6 float = 7 |
fieldtype=[0,1,2,3,6,7]
|
Description |
Yes |
A short description of the value to store in the field. |
description=[field_description] |
Example
Using all commands and arguments (please note the command is wrapped for display purposes only):
cmd=customfieldcreate&realm=myrealm_child&fieldname=gender&fieldtype=1&description=Gender:%20f=female,%20m=male
The custom field, ‘gender’ of type text, will created in the realm ‘myrealm_child’, a child of the Realm defined in the header with the description ‘Gender: f=female, m=male’.
Errors
A Create Custom Field command will fail if a custom field with the same name already exists.