Functionality based URLs

Overview

In the topic Zoho Creator URL Patterns we learned about the default URLs to access a Zoho Creator application and its forms, views and report formats. In this topic we will learn about the Functionality based URLs to set default values for form fields, edit individual records by passing record ID in the URL, set criteria for views and print a view.

Functionality based URLs

To set default values for form fields

The default values for form fields can be set by passing additional parameters to the form URL. For example, to automatically load a value for Employee ID field in http://app.zohocreator.com/zchelp/employee-manager/#Form:Employee. The default value is passed as querysting (Employee_ID=1234) to the url, where Employee_ID is the script name of the field in your form.

The form url with query string will be in the below formats.

  1. Accessing within the application:
    http://app.zohocreator.com/zchelp/employee-manager/#Form:Employee?Employee_ID=1234
  2. Accessing via the permalink:
    http://app.zohocreator.com/zchelp/employee-manager/form-perma/Employee/Employee_ID=1234
  3. Accessing via the Embed Link:
    http://app.zohocreator.com/zchelp/employee-manager/form-embed/Employee/Employee_ID=1234

For multi-select fields like check-box, there can be need for having more than one value selected by default. For such requirements, multiple values should be passed as key value pairs. For example, passingEmployee_ID=1234&Employee_ID=4321 in the query-string of form URL will make the multi-select field Employee_ID present in the form to have the two items 4321 and 1234 selected by default.

Note:

  • The default field values will be available in the form's on load action.

To edit individual records by passing record id in the URL

The url to view and edit individual record using its record ID is given below. This will display the zoho creator form in edit mode.

http://app.zohocreator.com/<userName>/<applinkname>/#Form:<formlinkname>?recLinkID=<recordID>&reportLinkName=<reportlinkname>

Refer the topic Editing Records via Record ID for more information,

To set criteria for a view

The criteria for a view can be passed as part of a query string to a view url. Multiple criterias are specified by appending it along with the URL using &apos;&&apos;

URL format for setting criteria with "=" (Equal) operator is given below:

http://app.zohocreator.com/<app owner name>/<app name>/#Report:<report name>?<FieldName1>=<FieldName1 Value> &<FieldName2>=<FieldName2 Value>

where,

FieldName1 & FieldName2 are the Deluge script names for the field in the form and multiple criterias are specified by appending it along with the URL using & operator.

Example:

The view http://app.zohocreator.com/zchelp/employee-manager/#Report:Employee_View lists all the records in the Employee View. To view records with Name EQUALs Henry and Employee ID EQUALs 1234, we need to pass the field name and value as querystring.The complete url for this example is,

http://app.zohocreator.com/zchelp/employee-manager/#Report:Employee_View?Name=Henry&Employee_ID=1234

URL format for setting criteria with operators other than "=" (Equal)

http://app.zohocreator.com/<app owner name>/<app name>/#Report:<report name>?<FieldName1>=<FieldName1 Value>&<FieldName2>=<FieldName2 Value>&<FieldName1_op>=<constant>&<FieldName2_op>=<constant>

where,

FieldName1 & FieldName2 are the Deluge script names for the field in the form.

FieldName1_op & FieldName2_op are parameter names for the operator (fieldname appended by _op).

constant is the value assigned for each operator. Refer the table to view the list of all operators and their constants.

Example1:

The view http://app.zohocreator.com/zchelp/employee-manager/#Report:Employee_View lists all the records in the Employee View report. To view records with Employee ID GREATER_THAN 1235, we need to pass the field name, value, parameter name for the operator and its value as querystring. The parameter name for Employee_ID is Employee_ID_op and the constant for GREATER_THAN is 21.

The complete url for this example is,

http://app.zohocreator.com/zchelp/employee-manager/#Report:Employee_View?Employee_ID=1235&Employee_ID_op=21

Example2:

The URL to view records with EmailID ENDS_WITH zoho.com and Roles CONTAINS Supports,

http://app.zohocreator.com/zchelp/employee-manager/#Report:Employee_View?EmailID=zoho.com&EmailID_op=25&Roles=Support&Roles_op=26

URL format for setting criteria with (between) operator

http://app.zohocreator.com/<app owner name>/<app name>/#Report:<report name>?<FieldName1>=<StartingRangeValue>;<EndingRangeValue>&<FieldName1_op>=<BETWEEN Constant>

where,

<StartingRangeValue> and <EndingRangeValue> can be any number, decimal or date.

Example1: The url to view records with Date_of_Joining between any two dates is given below. Here, Date_of_Joining is a date field.

http://app.zohocreator.com/zchelp/employee-manager/#Report:Employee_View?Date_of_Joining=18-Jan-2006;30-Apr-2007&Date_of_Joining_op=58

Example2: The url to view records between any two Employee_ID numbers is given below. Here Employee_ID is a number field.

http://app.zohocreator.com/zchelp/employee-manager/#Report:Employee_View?Employee_ID=1235;1238&Employee_ID_op=58

Note:

  • For some operators like EMPTY, NOT_EMPTY, YESTERDAY, TODAY, NEXT_YEAR, TRUE, FALSE, etc. the criteria value need not be specified. For example, the following URL will display records from the "Employee_View" whose "Date of Joining" falls on the "CURRENT_YEAR".

http://app.zohocreator.com/zchelp/employee-manager/#Report:Employee_View?Date_of_Joining_op=52

URL format for View Perma and View Embed

1. View Perma
 https://app.zohocreator.com/sampleapps/employees/view-perma/All_Employees/Name=Zoho 

2. View Embed

<iframe height=’500px’ width=’100%’ name=’zoho-All_Employees’ frameborder=’0′ scrolling=’auto’ allowTransparency =’true’ src=’https://app.zohocreator.com/sampleapps/employees/view-embed/All_Employees/Name=Zoho‘></iframe>

URL format for HTML Page

HTML Pages can also accept URL parameters. See this page 

Sample URL with parameter is
https://app.zohocreator.com/sampleapps/employees/#Page:Complete_Employee_details?emp=support@zohocreator.com

1. View Perma
 
https://app.zohocreator.com/sampleapps/employees/page-perma/Complete_Employee_details/emp=support@zohocreator.com 

2. View Embed

<iframe height=’500px’ width=’100%’ name=’zoho-Complete_Employee_details’ frameborder=’0′ scrolling=’auto’ allowTransparency =’true’ src=’https://app.zohocreator.com/sampleapps/employees/page-embed/Complete_Employee_details/emp=support@zohocreator.com‘></iframe>

List of Operators and their Constants

S. NoOperatorConstant
1EQUAL18
2NOT_EQUAL19
3LESS_THAN20
4GREATER_THAN21
5LESS_EQUAL22
6GREATER_EQUAL23
7STARTS_WITH24
8ENDS_WITH25
9CONTAINS26
10NOT_CONTAINS27
11LIKE28
12EMPTY29
13NOT_EMPTY30
14YESTERDAY31
15TODAY32
16TOMORROW33
17LAST_7_DAYS34
18LAST_30_DAYS35
19LAST_60_DAYS36
20LAST_90_DAYS37
21LAST_120_DAYS38
22NEXT_7_DAYS39
23NEXT_30_DAYS40
24NEXT_60_DAYS41
25NEXT_90_DAYS42
26NEXT_120_DAYS43
27LAST_MONTH44
28THIS_MONTH45
29NEXT_MONTH46
30CURR_PREV_MONTH47
31CURR_NEXT_MONTH48
32TRUE49
33FALSE50
34LAST_YEAR51
35CURRENT_YEAR52
36NEXT_YEAR53
37PREVIOUS_2_YEAR54
38NEXT_2_YEAR55
39CURRENT_PREVIOUS_YEAR56
40CURRENT_NEXT_YEAR57
41BETWEEN58

To print a report

The url format to print a report is given below:

http://app.zohocreator.com/<app owner name>/<app name>/print/<report name>

For example:
http://app.zohocreator.com/zchelp/employee-manager/print/Employee_View

To print a report with criteria

URL format to print a view with criteria, using "=" (Equal) operator

http://app.zohocreator.com/<app owner name>/<app name>/print/<report name>/<FieldName1>=<FieldName1 Value>&<FieldName2>=<FieldName2 Value>

For example, the url to print employee records belonging to the "Engineering" department

http://app.zohocreator.com/zchelp/employee-manager/print/Employee_View/Department=Engineering

URL format to print a report with criteria, other than "=" (Equal) operator

http://app.zohocreator.com/<app owner name>/<app name>/print/<report name>/<FieldName1>=<FieldName1 Value>&<FieldName2>=<FieldName2 Value>&<FieldName1_op>=<constant>&<FieldName2_op>=<constant>

where,

FieldName1 & FieldName2 are the Deluge script names for the field in the form.

FieldName1_op & FieldName2_op are parameter names for the operator (fieldname appended by _op).

constant is the value assigned for each operator. Refer the table to view the list of all operators and their constants.

Example:

To URL to print records with Employee ID GREATER_THAN 1235,

http://app.zohocreator.com/zchelp/employee-manager/print/Employee_View/Employee_ID=1235&Employee_ID_op=21

URL format to print a view with criteria, using "between" operator

http://app.zohocreator.com/<app owner name>/<app name>/print/<report name>/<FieldName1>=<StartingRangeValue>;<EndingRangeValue>&<FieldName1_op>=<BETWEEN Constant>

where, <StartingRangeValue> and <EndingRangeValue> can be any number, decimal or date.

Example:

The url to print records with Date_of_Joining between any two dates is given below. Here, Date_of_Joining is a date field.

http://app.zohocreator.com/zchelp/employee-manager/print/Employee_View/Date_of_Joining=18-Jan-2006;30-Apr-2007&Date_of_Joining_op=58

To print a HTML page with parameter

The URL format to print a HTML view with parameter is given below,

http://app.zohocreator.com/<app owner name>/<app link name>/print/<page name>/<paramName>=<paramValue>

where,

paramName is the name of the parameter defined in the HTML page.
paramValue is the value passed to the parameter defined in the HTML page.

Example:

The url to print a HTML page named "TestHTML" with paramName "dept" and paramValue as "Engineering" is given below. Here, the paramName "dept" is the name of the parameter defined in the HTML page to fetch records with the specified paramValue.

http://app.zohocreator.com/zchelp/employee-manager/print/TestHTML/dept=Engineering

To convert HTML view to PDF

URL Formats

1. The url format to convert an HTML view to PDF is given below:

http://creatorexport.zoho.com/<app owner name>/<app link name>/pdf/<HTML view link name>
https://creatorexport.zoho.com/latha/order-management/pdf/Generate_Invoice

Example PDF Link: http://creatorexport.zoho.com/sampleapps/customer-support/pdf/Most_Recent_Solution

2. The url format to convert an HTML view to PDF with output file name. If no zc_Filename parameter is passed, then by default view display name will be chosen as file name.

http://creatorexport.zoho.com/<app owner name>/<app link name>/pdf/<HTML view link name>/&zc_FileName=<output file name>

Example PDF Link with file name: http://creatorexport.zoho.com/sampleapps/customer-support/pdf/Most_Recent_Solution/&zc_FileName=ReportFor_Oct26

3. The url format to convert an HTML view to PDF with parameter, where, paramName is the name of the parameter defined in the HTML view and paramValue is the value passed to the parameter defined in the HTML view.

http://creatorexport.zoho.com/<app owner name>/<app link name>/pdf/<HTML view link name>/&<paramName>=<paramValue>

a. Example PDF Link with arguments: http://creatorexport.zoho.com/sampleapps/customer-support/pdf/More_Details_Html_View/&ticketID=104
where, ticketID is the name of the parameter defined in the HTML view.

b. Example PDF Link with arguments and file name: http://creatorexport.zoho.com/sampleapps/customer-support/pdf/More_Details_Html_View/&ticketID=104&zc_FileName=ReportFor_Oct26
where, ticketID is the name of the parameter defined in the HTML view.

4. The url format to convert an HTML view to PDF with the PDF's orientation value. The orientation value can be landscape or portrait. The default value is portrait.

http://creatorexport.zoho.com/<app owner name>/<app link name>/pdf/<HTML view link name>/&zc_PdfOrientation=<orientation value>

a. Example PDF link with orientation value as landscape: http://creatorexport.zoho.com/sampleapps/customer-support/pdf/Most_Recent_Solution/&zc_PdfOrientation=landscape

b. Example PDF link with orientation value as portrait: http://creatorexport.zoho.com/sampleapps/customer-support/pdf/Most_Recent_Solution/&zc_PdfOrientation=portrait

5. The url format to convert an HTML view to PDF with the PDF's size. The values can beLetter, A4, Legal, Executive, with default value as Letter.

http://creatorexport.zoho.com/<app owner name>/<app link name>/pdf/<HTML view link name>/&zc_PdfSize=<size value>

Example PDF link with orientation value as landscape: http://creatorexport.zoho.com/sampleapps/customer-support/pdf/Most_Recent_Solution/&zc_PdfSize=Letter

Example PDF link with orientation value as portrait: http://creatorexport.zoho.com/sampleapps/customer-support/pdf/Most_Recent_Solution/&zc_PdfSize=A4

Limitation

  1. Div embedded forms/views inside the HTML view is not supported as already discussed in this Forum post. (Will be done only after we provide #include support. i.e server side include directive in deluge. Users will have to change to the new implementation once done to enable PDF output). Refer our limitations page for more details.
  2. Any authenticated content like images/css that requires your current credential will not be supported. i.e Any link/embedding in the HTML to be converted pdf should be public content.
  3. Any css/images and other links to be rendered have to be specified in full path. For example, /images/xyz.jpg will not be properly rendered. But http://creator.zoho.com/images/xyz.img will be properly rendered.

Note:

  • You can Show or Hide the PDF export option in your HTML view by selecting More Actions --> Header Option from the HTML view header, in Edit mode.

To Login to a specific Form, View or Page/Section

The url format to login to a specific Form, View or Page/Section in Zoho Creator is given below:
http://creator.zoho.com/sharedby/applinkname/component-login/componentlinkname/params

where,

<app owner name> refers to the name of the application owner
<app link name> refers to the application name as specified in the url when you access the application
<component> can be form, view or page in the application. Here, 'page' refers to the section name or tab name under which the forms and views are arranged.
<component link name> refers to the component name as specified in the url, when you access a Form, View or Page.
<params> is an additional parameter which the user wishes to pass to the component, for example, criteria.

When URLs with above formats are invoked, it will take the user to login box in the application context. On sign in, it will directly take the user to the specified component. (i.e) Form, View or Page. If any params are passed in the url, they would be set accordingly.

Examples:

1. To login to a form named "Department" in the application named "employee-manager" with username (app owner name) as "sampleapps":

http://creator.zoho.com/sampleapps/employee-manager/form-login/Department

2. To login to a view named "Employee_View_with_Advanced_Criteria" in the application named "employee-manager" with username (app owner name) as "sampleapps":

http://creator.zoho.com/sampleapps/employee-manager/view-login/Employee_View_with_Advanced_Criteria

3. To login to a page (section) named "Advanaced Views" in the application named "employee-manager" with username (app owner name) as "sampleapps":

http://creator.zoho.com/sampleapps/employee-manager/page-login/Advanced_Views

4. To login to a form named "Employee" in the application named "employee-manager" with username (app owner name) as "sampleapps" and additional params as "Employee_ID=001".
This will automatically display the form with the Employee_ID set as 001.

http://creator.zoho.com/sampleapps/employee-manager/form-login/Employee/Employee_ID=001

5. To login to a view named "Employee List View " in the application named "employee-manager" with username (app owner name) as "sampleapps" and criteria as "Department=Engineering".
This will display the view with employee records who belong to the department named "Engineering".

http://creator.zoho.com/sampleapps/employee-manager/page-login/Advanced_Views