Changes

SmartConnect - RESTful API

1,161 bytes added, 17:08, 13 March 2019
Using List Functions
<!--66823 - SmartConnect grouping criteria-->
<!--75675 - SmartConnect field name and format consistency-->
 
Custom parameters for List Functions are:
 
* criteria - this is an optional json array. This contains the following nodes: "andor", "field", "operator" and "value"
: "operator" - can use the following: =,>,>=,<=,<,<>,!=,like,not like
: "value" - value for the filter
: '''''sample1: ''''': criteria: [{"andor":"and","field":"FIELDNAME","operator":"like","value":"PATTERN"}]: sortby: [{"field":"FIELDNAME","direction":"asc"}]: othersettings : {"getstorevalue":"1","keyformat":"0"}: '''''sample2: ''''': criteria: [{"andor":"and","field":"FIELDNAME1","operator":"=","value":"100"},{"andor":"or","field":"FIELDNAME2","operator":"like","value":"PATTERN"}]: sortby: [{"field":"FIELDNAME","direction":"desc"}]: othersettings : {"getstorevalue":"0","keyformat":"0"}: '''''sample3:''''': An example query with brackets: ( (cf_somefield1 like '%whatever%' or cf_somefield2 like  '%whatever%'  or cf_somefield3 like  '%whatever%'  or cf_somefield4like  '%whatever%' ) and (cf_someotherfield1='whatever' or cf_someotherfield2='whatever else')): criteria: [{ "andor": "(", "field": "cf_somefield1", "operator": "like", "value": "whatever" },{ "andor": "or", "field": "cf_somefield2", "operator": "like", "value": "whatever" },{ "andor": "or", "field": "cf_somefield3", "operator": "like", "value": "whatever" },{ "andor": "or", "field": "cf_somefield4", "operator": "like", "value": "whatever" },{ "andor": ") and (", "field": "cf_someotherfield1", "operator": "=", "value": "whatever" },{ "andor": "or", "field": "cf_someotherfield2", "operator": "=", "value": ""whatever else" }]: sortby: : othersettings : {"getstorevalue":"0","keyformat":"0"}
* sortby - this is an optional json array. This contains the following nodes: "field" and "direction"
: "field" - name of the standard/custom field to sort records by
: "direction" - either "asc" (for ascending) or "desc" (for descending)
* othersettings** getstorevalue - this is an optional settings for the json array. <br/>Options are: int type: '''0''' - to get display value, '''1''' to get stored value (value from the database eg. $25,000 vs 25000)** keyformat - this is an optional settings for the json array. Options are: '''0''' - to use what is configured in the Field List form the SmartConnect Function, '''1''' - to use the custom field names / standard field names and '''2''' - to use the custom field ID
====Report Permission using API Report Function====
Smartstaff
1,385
edits