API_GetFieldProperties

Overview

Use API_GetFieldProperties to view the properties of a field. Returns properties specific to the field type.

API_GetFieldProperties lists summary field metadata. For example, Total Actual Hours is a summary field defined in a project table representing the actual number of hours team members have logged against tasks on time cards. It is based on the following field definitions:

  • It uses a relationship based on a reference field “related project” (fid: 48), and the API returns it as summaryReferenceFid

  • The field that it is summarizing is Actual Hours (fid: 133), and the API returns it as summaryTargetFid

  • The summary function is Total, and the API returns it as is

The sample code displays as follows:

<field>
   <summaryReferenceFid>48</summaryReferenceFid>
   <summaryTargetFid>133</summaryTargetFid>
   <summaryFunction>Total</summaryFunction>
 </field>

Request parameters

Parameter

Value

Required?

fid

field id

yes

top

Response values

Element Name

Value

action

The originating request, for example, API_GetFieldProperties.

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.

top

Sample XML Request

POST https://target_domain/db/main HTTP/1.1
Content-Type: application/xml
Content-Length:

QUICKBASE-ACTION:API_GetFieldProperties

<qdbapi>
<fid>35</fid>
</qdbapi>

top

Sample HTTP Get Request

https://target_domain/db/target_dbid?a=API_GetFieldProperties&fid=35

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

top

Sample response

Returns field properties based on the field type. The following example shows the response for a Formula - URL field type.

<?xml version="1.0" ?>
<qdbapi>
    <action>API_GetFieldProperties</action>
    <errcode>0</errcode>
    <errtext>No error</errtext>   
    <field id=”35” field_type=”url” base_type=”text” mode=”virtual”>
      <label>Add URL Action</label>
       <nowrap>0</nowrap>
       <bold>0</bold>
       <required>0</required>
       <appears_by_default>1</appears_by_default>
       <find_enabled>0</find_enabled>
       <allow_new_choices>0</allow_new_choices>
       <sort_as_given>1</sort_as_given>
       <formula>
URLRoot () &”db/” & [_DBID_URL_ACTIONS] & “?a=API_GenAddRecordForm&_fid_7=” & URLEncode ([Record ID#]}& “&z=” & Rurl()
       <BR/>
       </formula>
      <carrychoices>1</carrychoices>
      <foreignkey>0</</foreignkey>
      <unique>0</unique>
      <doesdatacopy>0</doesdatacopy>
      <fieldhelp/>
      <appears_as>Add URL action</appears_as>
      <abbreviate>0</abbreviate>
      <use_new_window>0</use_new_window>
      <auto_save>0</auto_save>
     </field>
</qdbapi>