transform
POSTALL,CFO/SetFormLookupList/{formId}/{fieldName}
Arguments
- formIdCharacter
Form definition id.
- fieldNameCharacter
Field name of the List field.
- listdataCharacter
Choices for the list. Can either be JSON array with 'value' and optional 'text' property, or CRLF list with data in the form displayValue|storedValue
Returns
- resultJSON Object
Returns an object with these properties:
- errorboolean
true if there was an error
- errorTextstring
- resultobject
- recordsUpdated
count of number of records updated
Description
Set the list of choices for a List field in a Form definition.
CURL
CURL --insecure -H "apikey:Your_api_key" -H "content-type: application/json" -H "accept: application/json" -d "{"""listdata""":value_of_listData}" "https://transform.alphasoftware.com/transformAPIVersion1.a5svc/SetFormLookupList/value_of_formId/value_of_fieldName"
Node
var request = require('request') var path = 'https://transform.alphasoftware.com/transformAPIVersion1.a5svc/SetFormLookupList/value_of_formId/value_of_fieldName'; var data = {"listdata": "value_of_listData"}; var dataJSON = JSON.stringify(data) request.post( { headers: {apikey: "Your_api_key"}, url: path, form: dataJSON}, function(err,httpResponse,body){ if(err) console.log(err) console.log(body) } )
Xbasic
dim apikey as c = "Your_api_key" dim postdata as c postdata = <<%txt% { "listdata": "value_of_listData" } %txt% dim url as c = "/SetFormLookupList/value_of_formId/value_of_fieldName" 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