Zoho Creator supports creation of dynamic views based on the data entered in a form. Let us take the example of a ‘Repair’ business, that will allow customers to go to a webpage and check the status of their repair by entering a repair tag. A typical situation would be as follows:
We have created a sample application named Repair Details based on the above requirement. The application has the following forms and views:
To enter the details about the customer and the product given for service. This form will have the following fields:
Displays all the records submitted in the Repair Details form.
This is a stateless form which is embedded in the website to enable the customer to know his repair status by entering his repair tag and contact number. The form comprises of the following fields:
Repair Tag – Text field to enter a unique tag assigned for each repair. For example, A001, A002 etc.
Contact Number – Number field to enter the customers contact number.
When a customer enters his Repair Tag and Contact number in the above form and clicks on the form button, the Repair Details View will be displayed with the specific record that matches the input values. This is achieved by adding Deluge Script to the Repair Status form.
Select Repair Status Form and select the On click form action.
Drag-n-drop the OpenUrl task from the Task tree. This task opens the given URL in a new window, same window, parent window or a popup.
To specify the url, click on Edit and specify the url in the format given below. Click Done to update it in the script builder.
openUrl((((((("/" + zoho.adminuser) + "/") + zoho.appname) + "/html/Repair_Detail_view/Customer_Contact=") + input.Contact_Number) + "&Repair_Tag=") + input.Repair_Tag, "new window");
zoho.adminuser – Returns the user name of the application owner
zoho.appname – Returns the name of the currently logged-in user
Repair_Detail_view – is the name of the view
Customer_Contact – is the name of the field in the Repair Status Form
Repair_Tag – is the name of the field in the Repair Status Form
The above url will display the Repair Detail view with the contact number and repair tag that matches the input value in the Repair Status form.
Click Save Script to update the script definition, as shown in the screen-shot given below.
In live mode, when the Repair Status form is submitted, the Repair Detail view dynamically displays the specific record, as shown below.
To install the application,