Data Dictionary code
Data Dictionary code
FYI:
- void Utilities.Data_Dictionary()
- {
- // the following code INFOs tab-delimited form and field info for analysis in a Google or Zoho Sheet or Excel
- // "allcreatorscopes" is an internal connection that has access to all Creator scopes
- //
- // the delimiter (a tab)
- del = "\t";
- // the various types of fields: https://www.zoho.com/creator/help/api/v2/get-fields.html
- field_types = {1:"Single Line",2:"Multi Line",3:"Email",4:"Rich Text",5:"Number",6:"Decimal",7:"Percent",8:"Currency",9:"Auto Number",10:"Date",11:"Date-time",12:"Drop Down",13:"Radio",14:"Multi Select",15:"Checkbox",16:"Decision Box",17:"URL",18:"Image",19:"File Upload",20:"Formula",21:"Subform",22:"Zoho CRM",23:"Zoho CRM Link",24:"Add Notes",25:"Signature",26:"Users",27:"Phone",28:"Section",29:"Name",30:"Address",31:"Integration",32:"Audio",33:"Video",34:"Time",35:"OCR",36:"Object Detection",37:"Keyword Extraction",38:"Sentiment Analysis",39:"Prediction"};
- //
- // https://www.zoho.com/creator/help/api/v2/get-forms.html
- response = invokeurl
- [
- url :"https://creator.zoho.com/api/v2/" + zoho.adminuser + "/" + zoho.appname + "/forms"
- type :GET
- connection:"allcreatorscopes"
- ];
- forms = response.getJSON("forms").toList();
- // A header row for all of the data
- info "Form Link Name" + del + "Form Display Name" + del + "Field Link Name" + del + "Field Display Name" + del + "Field Type" + del + "Is Lookup" + del + "Visible" + del + "Unique" + del + "Mandatory" + del + "Max Char" + del + "Choices" + del + "Subform";
- for each form in forms
- {
- form_link_name = form.get("link_name");
- form_display_name = form.get("display_name");
- //
- // https://www.zoho.com/creator/help/api/v2/get-fields.html
- //
- response = invokeurl
- [
- url :"https://creator.zoho.com/api/v2/" + zoho.adminuser + "/" + zoho.appname + "/form/" + form.get("link_name") + "/fields"
- type :GET
- connection:"allcreatorscopes"
- ];
- fields = response.getJSON("fields").toList();
- //
- for each field in fields
- {
- info form_link_name + del + form_display_name + del + field.get("link_name") + del + field.get("display_name") + del + field_types.get(field.get("type").toNumber()) + del + field.get("is_lookup_field") + del + field.get("visibility") + del + field.get("unique") + del + field.get("mandatory") + del + field.get("max_char") + del + field.get("choices") + del + field.get("ref_form");
- }
- }
- }