API_EditRecord

Overview

Use API_EditRecord to change any editable field values in the specified record. Only those fields specified are changed; unspecified fields are left unchanged.

You can specify either field names or field IDs when using this call.

top

Request parameters

The following request parameters are available:

Parameter Value Required?

rid or key

The record ID of the record to be edited. You can obtain the recordID of any record in a query. (See API_DoQuery).

If you use a key field OTHER than the record id (rid), you should use the key parameter rather than rid.

yes

update_id

Specifies the latest record state.

Note that, if another user makes changes before you issue this call,  the update ID in QuickBase will change, which will render invalid the update ID that you have. In this case, you should get the latest version of the record and its new update ID, and then make your changes.

You can obtain the update ID for a record using the API_GetRecordInfo for the record you are editing.

no

field

Specify values for the fields that make up the record you want to add using either the fid attribute or name attribute of the <field> element.

For example:

<field fid=”18”>Hi!</field>
<field name=”Message”>Hi!</field>

You must specify all required fields.

The values you enter here will vary, depending on field type. See How to specify values for different field types for more information.

yes

disprec

Set this parameter to 1 to specify that the new record should be displayed within the QuickBase application. An application login is required before the record can be displayed. If you use this parameter, QuickBase returns the normal QuickBase HTML page that displays the record.

Omit this property if you don't want the new record to display within the QuickBase application.

no

fform

Set this parameter to 1 if you are invoking API_EditRecord from within an HTML form that has checkboxes and want those checkboxes to set QuickBase checkbox fields.

Omit this property if you don't need QuickBase to set Checkbox fields based on your HTML page.

no

ignoreError

Set this parameter to 1 to specify that no error should be returned when a built-in field (for example, Record ID#) is written-to in an API_EditRecord call.

If you do not set this parameter, QuickBase returns an error when API_EditRecord writes to a built-in field.

 

ticket

Specifies valid authentication ticket. You obtain a valid ticket from API_Authenticate. A ticket is also returned in the various API responses. See API Overview for more information on the authentication ticket.

yes

apptoken

Specifies a valid application token. See API Overview for more information on application tokens.

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

msInUTC

Allows you to specify that QuickBase should interpret all date/time stamps passed in as milliseconds using Coordinated Universal Time (UTC) rather than using the local application time.

Set this parameter to 1 if you want to use Coordinated Universal Time. See usage example.

no

top

Response values

The response to this call contains the following:

Element Name Value

action

Echoes the originating request, for example, API_AddField.

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.

rid

Record ID of the record that was edited

num_fields_changed

The number of record fields successfully updated in the edit.

update_id

This parameter is used to detect update conflicts when invoking API_EditRecord.

You could save this update ID when you add a new record, but it would be better to instead get the most recent update_id value later when you query for the record to get it and update it.

top

Sample XML Request

POST https://target_domain/db/target_dbid HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_EditRecord

Using Field Names

<qdbapi>
  <udata>mydata</udata>
   <ticket>auth_ticket</ticket>
   <apptoken>app_token</apptoken>
     <rid>4</rid>
  <field name="start_date">06-08-2008</field>
   <field name="attendee_name">Joseph Riesentrotter</field>
</qdbapi>

Using Field IDs

<qdbapi>
<udata>mydata</udata>
   <ticket>auth_ticket</ticket>
   <apptoken>app_token</apptoken>
     <rid>4</rid>
  <field fid="11">06-08-2008</field>
  <field fid="12">Joseph Riesentrotter</field>
</qdbapi>

top

URL alternative

https://target_domain/db/target_dbid?a=API_EditRecord&rid=154
&_fnm_second_year=1776&_fid_8=changed&update_id=992017018414
&ticket=auth_ticket&apptoken=app_token

where target_domain is the domain against which you are invoking this call, for example, intuit.quickbase.com. Read about this notation.

top

Sample response

<?xml version="1.0" ?>
<qdbapi>
   <action>API_EditRecord</action>
   <errcode>0</errcode>
   <errtext>No error</errtext>
   <ticket>2_bddqkpam2_dpsx_b_dhfjng8kqhysrb2vbisibpzjqz7</ticket>
   <rid>17</rid>
   <num_fields_changed>2</num_fields_changed>
   <update_id>1205700275470</update_id>
</qdbapi>

top   

© 1999-2014 Intuit Inc. All rights reserved. Legal Notices.