Zoho Creator : Modify data across forms

Posted by Posted on by
0

In our latest update, we have just made zohocreator more powerful. We have empowered deluge scripting with the ability to modify existing data using our new ‘Update field task’. We already supported fetching of existing form data and now you can fetch and update the values.

Lets us see a library manager in action for illustration

Take a very simple use case : User is borrowing a book from the library

In library manager terminology, it is called ‘Issuing a Book’.

1). The following books are owned by the library.
The column ‘Status’ with values ‘Available’ and ‘Issued’, indicates whether the book is available in the library or is issued to any user.

Books

2).Already the following books were issued to the users on the mentioned issue date.

(Note:This view is created from the form ‘Issue Book’ shown below this view.)
Issued details

3).Now, we are getting a scenario where the user ‘James’ is borrowing the book ‘The City of Joy’.

Use the ‘issue book’ form given below to get book name and user name.

(Note: The above view ‘Books Issued Details’ represent the data in this form. Also in this form, the field ‘Issue date’ is hidden and not shown to the user for filling.)
Issue form

In addition to getting book and user information, we need to do the following

  • Store the current date in the ‘issue date’ field(hidden from user) of the above form, indicating that the book is issued today.
  • Change the status of this book from ‘Available’ to ‘Issued’.(This data is available in different form i.e Book form)

As you can see, these two operations need not be done explicitly by the user as they can be automatically calculated.
This is where our ‘Update field task’ comes into play.

Especially in the second operation, we have to get the corresponding book (i,e. The City of Joy) from the book form data and modify it.

We can use the ‘on success‘ event block of the ‘Issue Book’ form to write the three lines of code , that is going to do the magic.

on success
{

//store the current time in ‘issue date’ field.
issuedate = zoho.currenttime;

//fetch the book row from the ‘Book’ form
myBook = Book [Name == input.book];

//modify the ‘Status’ of this book to ‘Issued’.
myBook.Status = “Issued”;

}

Below , you can see the changes done after submitting the form.

  • ‘Status’ of the book ‘The City of Joy’ is modified.

book

  • Current date is automatcally stored in the ‘Issue date’ field (See the new entry added at the top).

Issued details

Thus you can see that your applications created in zohocreator can just get the minimally required information from the user and modify any other related parameters anywhere in the application using the ‘Update field task’. It helps in incorporating a lot of intelligence into your application, moving away the unnecessary burdens from the end user.Your application can no more be a mere store and retrieval place. It can be more lively now.

You can have a glimpse of my library manager completely created from scratch using our zohocreator.

The Zoho Experience

Posted by Posted on by
0

Please welcome Dean Ernst, the newest member of the Zoho development team. Dean’s started a blog at http://zohoexperience.com where he will be sharing his experiences in developing a web app for Zoho – his coming down from Australia, his staying at a hotel in Chennai, the culture shock he experienced, his interactions with the various Zoho teams etc. If you have anything specific in mind that you would like to hear about Zoho, please comment here. Dean will try addressing your queries in his own style.

More about Dean & his first post at Zoho Experience.

Featured Zoho User – Barry Dahl

Posted by Posted on by
0

There are so many of you users out there who use Zoho in your day-to-day life and on your blogs/websites. We will be featuring some of you out here. Featured today is Barry Dahl (his other blog). Barry is the VP of Technology & Virtual Campus at Lake Superior College (LSC), Duluth, Minnesota, USA & he is an extensive user of various Zoho services.

In a blog post where he gives the new PSOL (Priorities Survey for Online Learners) results, Barry embeds charts created with Zoho Sheet. He also has a presentation made using Zoho Show titled “Opening Duty Day at LSC” which deals with appropriate use of computers & LSC Networks. Some of his blog posts use Zoho Show as well. His document titled ‘Duty Day Workshop – Free Web Tools‘ is on Zoho Writer. And he has a blog post with an embedded Zoho Poll. Barry, is that it or are you using any other Zoho service? :-)

If you are an extensive user of multiple Zoho services, please do write to us (update : you can mail to aravind[at]zoho[dot]com). We will feature you here.

Zoho Creator : Creating Ajax forms

Posted by Posted on by
2

We made another update in Zoho Creator and now you can

  • Improve the usability of a form by validating field data even before it is submitted.
  • Modify contents of the form dynamically when it is loaded.
  • Modify field values based on user action (on other fields).

See the sample registration form that you can even embed in your website. You can also see the working version and the deluge script.

1. It allows users to register till 1st January 2007. If you try to access the form after 1st Jan 2007, it will just display that the registration is closed. This validation is done when the form is loaded.

Deluge code snippet:

on load
{
    if (zoho.currenttime > ’01-Jan-2007 00:00:00′)
    {
         hide name;
         hide emailid;
         hide blog_url;
         hide about_yourself;
         hide emailiderror;
         set showmessage = “Registration is CLOSED!”;
    }
}

2. It is designed to accept only 100 registrations. It displays that the registration is closed if more number of people try to register. This validation is also done when the form is loaded.

Deluge code snippet:

on load
{
     if (count(Register) >= 100)
     {
         hide name;
         hide emailid;
         hide blog_url;
         hide about_yourself;
         hide emailiderror;
         set showmessage = “The registration is CLOSED!
We have exceeded the limit of 100 registrations”;
    }
}

3. A person can register with the same Email ID only once. This is done in the on change event of the Email ID field. An Ajax request is sent to the server to validate the Email ID.

Deluge code snippet:

on change
{
      if (count(Register[emailid == input.emailid]) > 0)
     {
           set emailiderror = “This email id already exists”;
           show emailiderror;
     }
}

We have added a few other features also in this update. Will be posting about them separately.
Do try this feature and send us your feedback / suggestions.

PIP: Presentation inside Presentation

Posted by Posted on by
0

PIP doesnt have to be ‘Picture in Picture’ for on your television set alone. Now it can also be ‘Presentation inside Presentation’. Zoho Show’s embedding presentations feature lets you embed presentations inside other slides.

When I showed this to a friend, he asked me whats the use case. Thats a good question. Imagine if you want to talk about 2-3 products (like Zoho with more than 10 apps), instead of navigating across 3 seperate presentations and moving between them you can create individual presentations and then create a place holder (another presentation) which holds all other presentations. This way you can have only 3-4 slides in your main presentation, but each of the slides can dig deep into the topic with its own slide set.

To get this functionality, first you need to make the presentations (the ones you want to embed) public and use embed slideshow option, take the code and insert this into your new presentation.

Here is a presentation where I embedded couple of other presentations in each of the slides. The fourth slide also has a feedback form. Please provide your comments in there and all the feedback provided is also visible in the fifth slide (thanks to Zoho Creator).

Raju