Link to Edit an Individual Record

posted by Pete Thomas in Development, Zoho Creator
  • 351 views
  • 3 comments

I’ve been doing some work for a client who chose Zoho Creator to prototype an auction application they are building. One of the requirements for the application is that after a user fills out its registration form, the application needs to send that user an email containing a link back to their editable registration info so they can later correct any mistakes or update the information.

It’s a pretty common requirement for any web application but unfortunately one that isn’t readily available in the current version of Zoho Creator. Though I expect a convenient facility will soon be introduced, it’s not here yet and in fact the only links to ZC data that are easy to create point to either entire views or individual read-only records.

Suspecting there must be a way to link to an editable record and of the opinion that the rest of what ZC had to offer my client through its “official” interface (letting them do much of the wireframing themselves, customizing the forms and views, embedding those forms and views in their test web site, etc.) would make figuring out how to do so worth my effort, I spent several (non-billed!) hours doing some research and tinkering. My results take up the rest of this post.

Digging into ZC “internals”

The first thing I did was employ the powers of Feed43 to analyze the HTML of an editable Zoho Creator view (I just grabbed a public view that was readily available for this example, the form fields it contains don’t actually have anything to do with user registration).

If you click Switch to advanced mode [?] on that page and click on the various [Reload] and [Preview] buttons that are available, you should be able to see how I pieced together links to editable records like this one by directly accessing a page on the ZC server called showEditForm.do.

All I did was use Feed43 to extract values normally passed to a ZC JavaScript function and include them in a URL. The arguments are typically only relevant to the internals of Zoho Creator operation, like:

  • formid: 50432000000414441
  • viewid: 50432000000414492
  • tableName: t_50432000000414441
  • record: 50432000000414604
  • viewlinkId: 58

Though you might recognize that last one, viewlinkId, since its value corresponds to the Permalink ZC gives you. Anyway, I pulled all those fields out just so I can build an editable link to any record in my view.

Usage with Your Own Views

Here are the basic steps you can use to create an “link template” so someone could edit any record in any of your views.

  • Visit that Feed43 page I created
  • Change the value in the Address* field to the Permalink of the ZC view you are working with
  • Click [Reload]
  • Click [Extract]
  • Click [Preview]
  • Copy one of the links from the Feed Preview: [?] field.
  • In the link you copied, replace landofzc with your own ZC username

If you visit your newly created link, it should bring up a page that lets you edit one of the individual records from your view.

Now, in conjunction with the magic ID field that Zoho Creator provides you, in your own ZC application you can hard code the majority of that link into an on success {} sendmail() call but replace the value of the pkValue= key with the current value input.ID and thus dynamically create emails that contain something like this:

Thank you for registering! You can visit your profile at any time to update the information.

Note that such a page will also respond to any On Edit events as well (on load{}, on validate {}, on success {}) you might want to include.

  1. Zach CYPRUS Said,

    Nice creative work around, but if Zoho did something as simple and elegant as a Wufoo.com forms front end interface to ZC and other services it would really rock.

    As much as these workarounds are interesting, i personally feel we are having to step backwards to put them in place, i do hope Zoho will plug these big gaps in the usability of their services.

  2. Pete Thomas UNITED STATES Said,

    Zach,

    Thanks for the comment.

    I am in total agreement that Zoho has a long way to go on many fronts. The ZC team also readily concurs with us here.

    That being said, I tried Wufoo and though I found the user interface easy to use, also found the service filling a much more narrow spectrum of needs compared to ZC and in general thought the entire service rather limited. It’s certianly not suited for “online application development”, in my opinion.

    Thanks again!

  3. Land of Zoho Creator » Edit a private record Said,

    […] A while back, Pete shared a great tip for generating a direct link to edit a specific record in a Zoho Creator. This was a great tip, as this is a feature sadly lacking in Zoho Creator by default. The only drawback with this is that it only works for records that are publicly accessible. […]

Add A Comment