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, Reports and Pages. 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 and print Reports and Pages.

Functionality based URLs

To set default values for Form Fields

The default values for Form Fields can be set by passing additional parameters in the Form's URL. For example, to automatically load a value for the Field "Employee ID" in the Employee Manager Application, the default value is passed as query string (Employee_ID=1234) in the Form's URL, where Employee_ID is the Deluge script name of the Field in the Employee Form.

The Form's 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, passing Employee_ID=1234&Employee_ID=4321 as query string in the Form's 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 records using their 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 Report

The criteria for a Report can be passed as query string in a Report's URL. Multiple criterias are specified by appending them to the URL using the "&" Operator.

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 Fields in the Form.

Example:

The Report http://app.zohocreator.com/zchelp/employee-manager/#Report:Employee_View displays all the employee records of the Employee Manager Application. To view records with Name EQUALs Henry and Employee ID EQUALs 1234, we need to pass the Field names and corresponding values as query string.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 Fields in your Form.

FieldName1_op & FieldName2_op are parameter names for the Operator ("FieldName" appended with "_op").

constant is the value assigned for each Operator. Refer the table to view the list of all Operators and their Constants.

Example1:

The Report http://app.zohocreator.com/zchelp/employee-manager/#Report:Employee_View displays all the employee records of the Employee Manager Application. To view records with Employee ID GREATER_THAN 1235, we need to pass the Field name, its value, parameter name for the Operator and its value as query string. 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 Support,

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 in 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 Page

Pages can also accept URL parameters. Refer 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 Report 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 is,

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 Fields in the Form.

FieldName1_op & FieldName2_op are parameter names for the Operator ("FieldName" appended with "_op").

constant is the value assigned for each Operator. Refer the table to view the list of all Operators and their Constants.

Example:

The 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 Report 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 Page with parameter

The URL format to print a Page 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 Page.
paramValue is the value passed to the parameter that is defined in the Page.

Example:

The URL to print a 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 Page to fetch records with the specified paramValue.

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

To convert Page to PDF

URL Formats

1. The URL format to convert a Page to PDF is given below:

http://creatorexport.zoho.com/<app owner name>/<app link name>/pdf/<Page 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 a Page to PDF with output file name is given below: 

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

If the paramenter "zc_FileName" is not passed to the URL, then by default the Page's display name will be chosen as 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 a Page to PDF with parameter, where, paramName is the name of the parameter defined in the Page and paramValue is the value passed to that parameter.

http://creatorexport.zoho.com/<app owner name>/<app link name>/pdf/<Page 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 Page.

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 Page.

4. The URL format to convert a Page to PDF with the PDF's orientation value is given below. The orientation value can be landscape or portrait. The default value is portrait.

http://creatorexport.zoho.com/<app owner name>/<app link name>/pdf/<Page 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 a Page to PDF with the PDF's size is given below. The values can beLetter, A4, Legal, Executive, with default value as Letter.

http://creatorexport.zoho.com/<app owner name>/<app link name>/pdf/<Page 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/Reports inside Pages is not supported as already discussed in this Forum post. (This 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 the 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 Page to be converted into 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 Page by selecting More Actions --> Header Option from the Page header, in Edit mode.

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

The URL format to login to a specific Form, Report 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, Report or Page in the Application. Here, 'Page' refers to the section-name or tab-name under which the Forms and Reports are arranged.
<component link name> refers to the component name as specified in the URL, when you access a Form, Report 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, Report 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 Report 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 Report  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 Report with records of employees who belong to the Department named "Engineering".

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