=========
A lightweight abstraction layer for QuickBase
const record = new QBField({
quickbase: {
realm: '',
appToken: ''
},
// quickbase: QuickBase Instance
dbid: '' // defaults to dbid in url if found
fid: -1
});
This method clears the QBField instance of any trace of the existing field, but preserves defined connection settings.
This method deletes the field from QuickBase, then calls .clear()
.
name
: string, required
This method returns the DBID.
This method returns the Field ID.
This method executes an API_GetFieldProperties for the stored Field ID attributes.
attributesToSave
: array, defaults to undefined
If a field id is not defined, this will execute an API_AddField. After a
successful API_AddField, or if a field id was previously defined, this will
execute an API_EditFieldProperties. If choices
are defined for the field,
then appropriate API_FieldAddChoices and API_FieldRemoveChoices are executed.
If attributesToSave
is defined, then only configured attributes in this
array will be saved.
If this executes an API_AddField, the newly assigned Field ID is automatically stored internally.
attribute
: string, requiredvalue
: mixed, required
This method sets the passed in value
associated with the attribute
argument.
dbid
: string, required
Sets the dbid
setting.
fid
: integer, required
Sets the fid
setting.
attributesToConvert
: array, optional
returns the field as a JSON object
options
: obj, requiredattributes
: obj, required
Returns a new QBField instance built off of options
, that inherits
configuration data from the passed in attributes
argument.