Hi everyone,
A fortnight has gone by, and we are back with a new tip that would help you dynamically create views based on the data entered in a form.
The Page builder is one of the most powerful features of Zoho Creator. It helps to represent important information graphically on a single screen. You can create different types of
pages
that can include various components like panels, charts, reports, snippets, buttons, forms, and embedded links.
Now let's look at how you can dynamically filter the data in reports (that you've embedded on a page) based on a value entered in another from.
Example: Let's say we have two forms: Form A and Form B.
Form A is used to collect data and a corresponding Report A is created, displaying all the data submitted by users.
Form B is a stateless form with a Lookup field from Form A. Let's call it Lookupfield_A.
Note: Both of these forms are embedded in a HTML page.
Our objective: As soon as users click the custom button in Form B (Stateless form), we need to filter data in Report A based on a value selected in the Lookup field (Lookupfield_A).
Let's see how can we achieve this:
We need to use the following script in the Click Action of the custom button in Form B.
- openUrl("https://app.zohocreator.com/<user_Name>/<app_name>/view-embed/ReportA?LookupField.ID="+ input.Lookupfield_A+"&zc_ifr_load=true","iframe","iframename");
Note: An iframe (short for inline frame) is an HTML element that allows an external webpage to be embedded in an HTML document. Here, iframename is the name of the iframe in the page where Report A has to be displayed.
Sample HTML snippet of the Report A page would be as given below:
- <iframe height='500px' width='100%' frameborder='0' allowTransparency='true' name= 'iframename' scrolling='auto' src=‘’></iframe>
To understand this better, please take a look at this
example
.
Hope you got a fair idea of how to view data dynamically based on information entered in a form. If you have any further doubts or queries on anything related to pages, we've some good news. We'll be soon hosting an Ask the Expert(ATE #02) session on Page Builder where you can ask them all.
Keep watching this space for more such tips.