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:
- Customer comes to the shop and gives his product to service. He is given a unique repair tag, using which he can check the status of the repair, online.
- The customer contact info and repair details are entered in the online form.
- The repair staff completes the repair and updates the repair status to the online form.
- The customer goes to the website and enters his repair tag and then can view the status of the repair.
We have created a sample application named Repair Details based on the above requirement. The application has the following forms and views:
Repair Details form
To enter the details about the customer and the product given for service. This form will have the following fields:
- Product – Text field to enter the product name given for servicing
- Description- Multi-text field to enter the service description
- Date – Date field to enter the date on which the product was given for service
- RepairTag – Text field to enter a unique Repair tag
- Contact Number – Text field to enter the customers contact number
- EmailId- Email field to enter the email id of the customer
- Status – List field with values “Not Started”, “In Progress” and “Completed”. If a repair is completed, the status will be updated as “Completed”.
Repair Details view
Displays all the records submitted in the Repair Details form.
Repair Status 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,
Learn how to install the application to your account - click here.