191 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Are You Attending IBM Connect 2017?
Thu, Dec 15th 2016 7
@DbLookup in Javascript? You Bet!
Mon, Nov 7th 2016 7
ICAA – Did IBM Release a Free Version of the Notes Client?
Sun, Oct 30th 2016 6
IBM Extends Support for Notes V9.0.1 to 2021
Fri, Sep 23rd 2016 7
Mobile App Dev for Dummies
Fri, Sep 23rd 2016 5
MWLUG 2016 Recap
Sat, Aug 20th 2016 4
Quickr Alert – SSL Certs Expire Jan 1, 2017
Fri, Aug 19th 2016 8
Top 10
Is 2017 The Year IBM Announces the End of Life of Notes?
Tue, May 24th 2016 10
Quickr Alert – SSL Certs Expire Jan 1, 2017
Fri, Aug 19th 2016 8
IBM Extends Support for Notes V9.0.1 to 2021
Fri, Sep 23rd 2016 7
@DbLookup in Javascript? You Bet!
Mon, Nov 7th 2016 7
Are You Attending IBM Connect 2017?
Thu, Dec 15th 2016 7
IBM Announces a Change is Coming to the Notes & Domino Life Cycle Policy
Fri, Aug 12th 2016 6
ICAA – Did IBM Release a Free Version of the Notes Client?
Sun, Oct 30th 2016 6
DIY – Migrating from IBM Quickr with DOCOVA Migration Tools
Tue, Apr 21st 2015 5
Mobile App Dev for Dummies
Fri, Sep 23rd 2016 5
DOCOVA SE General Release Announcement!
Wed, May 27th 2015 4


@DbLookup in Javascript? You Bet!
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
David Wice    

When moving Notes applications from a Notes client to a web client, there are a number of design approaches that need to be changed.   While Domino will support many @Functions on the web, often they come with the unwanted side effect of a refresh of the form.  One example of this is drop down selection fields that present available values based on a lookup, where the lookup key comes from another field on the form.

This article presents a way to achieve this functionality using Javascript and jQuery.

The examples shown are within the DOCOVA framework, however the concepts can be applied to any Domino web application, or actually, any web application.

Let me setup the scenario.  First, I have some configured lists setup, in this case, a list of countries, where each country has a list of cities.

fig1

fig2

In my form, I have Country and City fields setup, with drop down like icons for selecting the respective values.  The concept is straightforward, after a Country is selected, the City list shows only those cities that are listed for that Country.

fig3

Here’s the selection dialog in action, first picking a Country

fig4

Then a City

fig5

Selected values, shown in the form

fig6

Now let’s have a look at how this is done.   In my example, I’m working on a Domino server, but as mentioned, the concepts can be applied to any platform.

Here are my fields in Domino Designer

fig7

Arguably, the Country field could be a standard drop down field with a @DBLookup formula that retrieves the Country list, however I’ve opted for full client side Javascript for this example so it can be applied to any platform.

The selectCountry() function calls dbLookup, which we have created as a direct replacement for the formula language @DBLookup function, and is part of our Docova.Utils JS class that contains a number of such methods.   The syntax for our dbLookup function and corresponding code is included in the attached code.  We use a JSON value pair array to pass the options so that the order doesn’t matter, and we can easily add options to the functions in the future without having to revisit all existing code. (Note the selectKeyword function is not included with this article)

selectCity() is very similar to selectCountry(), the difference being we pass the Country as part of the lookup key, allowing us to return the correct list of cities.

The JS header code is available here, and the dblookup function is here.

For more information on DOCOVA and how we’re migrating Notes applications to the web, visit www.docova.com.

 



---------------------
http://www.docova.com/dblookup-in-javascript-you-bet/
Nov 07, 2016
8 hits



Recent Blog Posts
7
Are You Attending IBM Connect 2017?
Thu, Dec 15th 2016 3:28p   Gary Walsh
The IBM Connect Conference,  which used to be Lotusphere until it was re-branded several years back, is to be held in San Francisco February 20-23 2017.  As you are probably aware, for more than two decades this event was held at the Disney complex in Orlando.  This is the first time the event is to be held on the West Coast of the USA. It has also been pushed back a month on the calendar. I personally have been to 18 of these events, starting out back in the day when you continuously cycled
8
@DbLookup in Javascript? You Bet!
Mon, Nov 7th 2016 5:46p   David Wice
When moving Notes applications from a Notes client to a web client, there are a number of design approaches that need to be changed.   While Domino will support many @Functions on the web, often they come with the unwanted side effect of a refresh of the form.  One example of this is drop down selection fields that present available values based on a lookup, where the lookup key comes from another field on the form. This article presents a way to achieve this functionality using Javascript an
6
ICAA – Did IBM Release a Free Version of the Notes Client?
Sun, Oct 30th 2016 12:05p   Gary Walsh
ICAA stands for IBM Client Application Access.  This is a standalone client, available for Mac and Windows, that is a stripped down version of the R9 Notes Basic client.   It has been around for awhile, June of 2015 I believe is when it was first released, however it seems to have come in under the radar of most customers and business partners.   Many thought it was simply a re-branding of the Notes browser plugin, which has been around for years now, and is installed by default when you in
7
IBM Extends Support for Notes V9.0.1 to 2021
Fri, Sep 23rd 2016 4:06p   Gary Walsh
The announcement IBM indicated was coming in September came.   It confirms that IBM will be extending support for the current version of Notes until “at least” 2021.  It also mentions that new features will be delivered as fix packs rather than new versions.  It delivered on some of the “what” but not much on the “why”.   Some blogs have suggested that IBM is embarking on a continuous delivery model for features, which in my opinion is a good thing.  It
5
Mobile App Dev for Dummies
Fri, Sep 23rd 2016 2:13p   Gary Walsh
I fly a little home built airplane as a hobby.  I am lucky in that it burns car gas instead of the much higher priced aviation fuel.  In Canada, in the province of Ontario, because a portion of gasoline tax goes to road improvements and an airplane does not use roads, you can get the tax back.  Its not hard to do. You take the information from your gas receipt, the quantity purchased, the price per liter, the total cost…that kind of thing, and you put into a log.  At the end of the yea
4
MWLUG 2016 Recap
Sat, Aug 20th 2016 6:31p   Gary Walsh
Overall the attendance was about the same as last year.  Somewhere around 200.  MWLUG, like many of the  Lotus User Groups, continues to fan the embers of the Notes and Domino community, keeping the flame burning.  Unlike the IBM Connect Event, formerly called Lotusphere, the sessions were Notes & Domino heavy, with a variety of seasoned speakers distributing valuable technical advice. The MWLUG venue was the Four Seasons in downtown Austin Texas.  Service was off the charts. A bit cree
8
Quickr Alert – SSL Certs Expire Jan 1, 2017
Fri, Aug 19th 2016 8:39a   Gary Walsh
I went to a session yesterday at MWLUG regarding SSL Certificates.  I had heard there were issues around SSL certs and it could impact Quickr customers.  What I learned is that Microsoft and Google are phasing out support for SHA-1 style certs, in favor of the more secure SHA-2 format.   As of Jan 1, 2017 Microsoft and Google will stop supporting these older SHA-1 certs. Since Domino 8.5 does not support SHA-2 certificates, customers need to upgrade to Domino 9.0.1 FP3 or higher. Quickr is n
6
IBM Announces a Change is Coming to the Notes & Domino Life Cycle Policy
Fri, Aug 12th 2016 2:06p   Gary Walsh
IBM recently posted this announcement. This is really an announcement that there will be an announcement.  Lets take a guess at what could be coming. The lifecycle policy defines the length of time that a product is supported following its release.  For IBM Notes it is classified as Enhanced, or 5 + 3.  The product will be supported for 5 years since the date it was released, with 3 more years  optional if a customer pays for support.   Notes 9.01 was released in April of 2013, so the end
10
Is 2017 The Year IBM Announces the End of Life of Notes?
Tue, May 24th 2016 8:16a   Gary Walsh
The rumor “Notes is Dead” has been going around for over a decade now, there seems to be a feeling of resignation resonating with both customers and partners that has not been there before.  There are still the die hards loyal to the technology, those in the crows nest who continue to salute as the ship settles further and further into the water, but their ranks are growing thinner. I highly doubt the Domino component of IBM Notes & Domino will disappear anytime soon.  It is ju
4
SharePoint – A Partner and Customer Perspective
Sat, Apr 2nd 2016 3:36p   Gary Walsh
Over the past decade SharePoint has gained market share and Notes/Domino has lost.  With more and more Lotus partners being forced into migration projects, more accurate information is becoming available on how the two compare. Marten Vosmer of Lialis B.V. in the Netherlands did a session at EngageUG 2016 that described in detail his process for moving Notes/Domino applications to SharePoint.  In his presentation he offered this sound byte that I found to be an excellent high level comparison




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition