getFieldNames()
Table of Contents
Overview
The getFieldNames() function returns the link names of all the fields in a form.
Return Type
- LIST
Syntax
// this syntax is not applicable to custom functions
(OR)
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned list of field link names. | LIST |
<collectionVariable> | A collection variable which holds records fetched using the fetch records task. | -- |
Example 1: Fetch field link name
The following snippet fetches records based on a given criteria and then extracts the field link names from a record in the collection.
collectionVar = Registrations[Email == "john@zylker.com"]; fieldNames = collectionVar.getFieldNames();
Example 2: Fetch display name of Zoho Creator fields using API
The following script fetches the display names of all the fields from the Zoho Creator form - form1 of the application - app1:
appLinkName = "app1"; formLinkName = "form1"; authtoken = "54927XXXXXXXXXXXXXXXXXXXXXX924e3"; url = "https://creator.zoho.com/api/json/" + appLinkName + "/"+ formLinkName + "/fields?authtoken=" + authtoken; response = invokeUrl [ url: url type: GET ];
where:
response
url
appLinkName
formLinkName
authtoken