transform

GETALL,RDA/GetFormDataArrayForFormId/{formId}

IN THIS PAGE

Arguments

formIdCharacter

FormId of the form definition

paginatedLogical

true/false - indicates if the results should be paginated.

pageSizeNumeric

number of records per page

pageNumberNumeric

page number for which data is returned

resolveMediaFieldsLogical

determine if coded data for media fields is resolved to the actual URL on Amazon S3.

getRecordCountLogical

if true, count of number of records is returned

timestampCharacter

timestamp when record was last updated. Format is yyyy-mm-dd 0h:0m:0s

fieldListCharacter

a list of the top level form fields that you want to return data from. if blank then data for all form fields are returned.

injectFormMetaDataIntoDataLogical

specifies if form meta data (i.e. name of user filling in form, form status, etc.) should be injected into the formdata return by the method.

otheroptionsCharacter

other options (in a JSON format)

returnMediaFileListLogical

specify if an array of media files should be returned - only honored if 'resolveMediaFields' is not true.

getFormDefinitionLogical

specify if the form definition should also be returned

formDataFilterJavascriptCharacter

Javascript code to filter the form data. Your Javascript code must return true or false. If true the formdata is included in the return result. Your Javascript code can reference form fields using this syntax: data.formdata.name_of_field (e.g. if(data.formdata.color == 'red') return true; ). If you specify a formdata filter you should also specify a metadata filter to limit that number of rows that need to be searched.

metadatafilterCharacter

Filter based on meta data fields. Syntax is SQL. E.g.: person = 'fred@acme.tom' and status = 'open'

metadatafilterparametersCharacter

If the metadata filter uses arguments, supplies the argument values. Format is a crlf delimited string of format value|||type|parametername

Returns

resultJSON Object

Returns an object with these properties:

errorboolean

true if there was an error

errorTextstring
hightimestring

date of last update to any record in the result array (format yyyy-mm-dd 0h:0m:0s)

resultarray
recordCount

number of records (1 if not paginated)

pageCount

(1 if not paginated)

Description

Get form data for all form instances of the specified formId. You can specify a hightime and only records edited after the specified hightime are returned.

See GetFormInstancesArrayForFormId for more information.

CURL 

CURL --insecure -H "apikey:Your_api_key" -H "accept: application/json"  "https://transform.alphasoftware.com/transformAPIVersion1.a5svc/GetFormDataArrayForFormId/value_of_formId?paginated=value_of_paginated&pagesize=value_of_pagesize&pageNumber=value_of_pageNumber&resolveMediaFields=value_of_resolveMediaFields&getrecordcount=value_of_getrecordcount&timestamp=value_of_timestamp&fieldList=value_of_fieldList&injectFormMetaDataIntoData=value_of_injectFormMetaDataIntoData&otherOptions=value_of_otherOptions&returnMediaFileList=value_of_returnMediaFileList&getFormDefinition=value_of_getFormDefinition&formDataFilterJavascript=value_of_formDataFilterJavascript&metadatafilter=value_of_metadatafilter&metadatafilterparameters=value_of_metadatafilterparameters"

Node 

var https = require('https');
var options = {
  protocol: "https:",
  hostname: "transform.alphasoftware.com",
  path: "/transformAPIVersion1.a5svc/GetFormDataArrayForFormId/value_of_formId?paginated=value%5fof%5fpaginated&pagesize=value%5fof%5fpagesize&pageNumber=value%5fof%5fpageNumber&resolveMediaFields=value%5fof%5fresolveMediaFields&getrecordcount=value%5fof%5fgetrecordcount&timestamp=value%5fof%5ftimestamp&fieldList=value%5fof%5ffieldList&injectFormMetaDataIntoData=value%5fof%5finjectFormMetaDataIntoData&otherOptions=value%5fof%5fotherOptions&returnMediaFileList=value%5fof%5freturnMediaFileList&getFormDefinition=value%5fof%5fgetFormDefinition&formDataFilterJavascript=value%5fof%5fformDataFilterJavascript&metadatafilter=value%5fof%5fmetadatafilter&metadatafilterparameters=value%5fof%5fmetadatafilterparameters",
  headers: {apikey: "Your_api_key"}
};

https.get(options, (resp) => {
  let data = '';
  resp.on('data', (chunk) => {data += chunk;});
  resp.on('end', () => {console.log(data);});
}).on("error", (err) => {console.log("Error: " + err.message);});

Xbasic 

dim apikey as c = "Your_api_key"
dim postdata as c 
dim url as c = "/GetFormDataArrayForFormId/value_of_formId?paginated=value%5fof%5fpaginated&pagesize=value%5fof%5fpagesize&pageNumber=value%5fof%5fpageNumber&resolveMediaFields=value%5fof%5fresolveMediaFields&getrecordcount=value%5fof%5fgetrecordcount&timestamp=value%5fof%5ftimestamp&fieldList=value%5fof%5ffieldList&injectFormMetaDataIntoData=value%5fof%5finjectFormMetaDataIntoData&otherOptions=value%5fof%5fotherOptions&returnMediaFileList=value%5fof%5freturnMediaFileList&getFormDefinition=value%5fof%5fgetFormDefinition&formDataFilterJavascript=value%5fof%5fformDataFilterJavascript&metadatafilter=value%5fof%5fmetadatafilter&metadatafilterparameters=value%5fof%5fmetadatafilterparameters"
dim pr as p
pr = a5dialogHelper_transformAPIQuery(url,postdata,apikey)
if pr.error = .f. then
	dim result as c 
	result = pr.result
else
	dim errorText as c 
	errorText = pr.errorText
end if