new Fmrest(obj)
Create an Fmrest object
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
obj |
Object | An object Properties
|
Methods
-
createGlobal(field, value)
-
Create Global wrapper
Parameters:
Name Type Description field
string a field name from filemaker
value
string the fields value
Returns:
- A new Global Object
- Type
- Global
-
createPortal(name, offset, range)
-
Create Portal wrapper
Parameters:
Name Type Description name
string a portal's name from filemaker
offset
number starting point of records to return
range
number how many records should be returned
Returns:
- A new Portal Object
- Type
- Portal
-
createRecord(json)
-
Create Record wrapper
Parameters:
Name Type Description json
Object a json object with field-value pairs
Returns:
- A promise that resolves with a record id
- Type
- Promise
-
createRequest()
-
Create Request wrapper
Returns:
- A new Request Object
- Type
- Request
-
createSort(field, sort)
-
Create Sort wrapper
Parameters:
Name Type Description field
string a field name from filemaker
sort
string a sort order (ascend, descend or value list name)
Returns:
- A new Sort Object
- Type
- Sort
-
deleteRecord(id)
-
Delete Record wrapper
Parameters:
Name Type Description id
number filemakers internal record id
Returns:
- A promise that resolves with a boolean
- Type
- Promise
-
editRecord(id, json, modId)
-
Edit Record wrapper
Parameters:
Name Type Description id
number filemakers internal record id
json
Object a json object with field-value pairs
modId
number the last modification id
Returns:
- A promise that resolves with a record id
- Type
- Promise
-
find(obj)
-
Find wrapper
Parameters:
Name Type Description obj
Object An object
Properties
Name Type Description requests
Array An array of Request Objects
sorts
Array An array of Sort Objects
offset
number starting point of records to return
range
number how many records should be returned
portals
Array An array of Portal Objects
Returns:
- A promise that resolves with multiple records
- Type
- Promise
-
getAllRecords(obj)
-
Get All Records wrapper
Parameters:
Name Type Description obj
Object An object
Properties
Name Type Description offset
number starting point of records to return
range
number how many records should be returned
sorts
Array An array of Sort Objects
portals
Array An array of Portal Objects
Returns:
- A promise that resolves with multiple records
- Type
- Promise
-
getRecord(id, portals)
-
Get Record wrapper
Parameters:
Name Type Description id
number filemakers internal record id
portals
Array An Array of Portal Objects
Returns:
- A promise that resolves with a record
- Type
- Promise
-
login()
-
Login wrapper
Returns:
- A promise that resolves with a token
- Type
- Promise
-
logout()
-
Logout wrapper
Returns:
- A promise that resolves with a boolean
- Type
- Promise
-
setGlobals(globals)
-
Set Globals wrapper
Parameters:
Name Type Description globals
Array An Array of Global Objects
Returns:
- A promise that resolves with a boolean
- Type
- Promise