Don't forget to check out our JSON RESTful APIs, they can help you utilize and extend Quickbase with ease.
Overview
Use this call to add new choices to a text - multiple choice or multi-select text field in a Quickbase table.
Note: Choices added to a Multi-select Text field are limited to 60 characters, and the total number of choices in the field may not exceed 100.
If you have Full Administration rights on the application, you can add new choices to any field of those types. If you don’t have these rights, you can use this call only on fields with properties that are set to allow users to add new choices. (In the Quickbase UI, you can set the Allow users to create new choices field property to allow users to do this. You can also set this property using API_SetFieldProperties.)
If the choice you specify already exists in the list, it will not be added. No duplicates are allowed.
Request parameters
Parameter | Value | Required? |
---|---|---|
fid |
The field ID of the setfield to which you want to add choices. |
yes |
choice |
Specifies a choice you want to add. Use this tag multiple times to add more than one choice.
|
yes |
ticket |
A valid authentication ticket. The authentication ticket is returned via the API_Authenticate call. |
yes, one of:
|
usertoken |
The user token is an alternative means of authentication, used for API access. User tokens cannot be used to access the Quickbase UI. |
yes, one of:
|
apptoken |
A valid application token. |
yes, if the application requires application tokens. |
udata |
A string value that you want returned. It will not be handled by Quickbase but it will be returned in the response. |
no |
Response values
Element Name | Value |
---|---|
action |
The originating request, for example, API_FieldAddChoices. |
errcode |
Identifies the error code, if any. (See the Error Codes appendix for a list of possible error codes.) 0 indicates that no error was encountered. |
errtext |
Text that explains the error code. "No error" indicates that no error was encountered. |
udata |
Optional. Contains any udata value supplied in the request. |
fid |
The field ID of the multiple choice field to which you added choices. |
fname |
The label of the field to which you added choices. |
numadded |
The number of choices successfully added. |
Sample XML Request
POST https://target_domain/db/target_dbid HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_FieldAddChoices<qdbapi>
<udata>mydata</udata>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
<fid>11</fid>
<choice>Don Tomas</choice>
</qdbapi>
URL alternative
https://target_domain/db/target_dbid?a=API_FieldAddChoices&fid=7&choice=Bob
&choice=Mary&ticket=auth_ticket&apptoken=app_token
where target_domain is the domain against which you are invoking this call, for example, quickbase.com. Read about this notation.
Sample response
<?xml version="1.0" ?>
<qdbapi>
<action>API_FieldAddChoices</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<udata>mydata</udata>
<fid>11</fid>
<fname>Fumables</fname>
<numadded>1</numadded>
</qdbapi>