05/24/2022 | Update back-end Datatables object from front-end cell reference This updates the back-end table object as well as the front-end html table. This is only needed when content is updated after the initial table has been drawn and you're using the Datatables native PDF, XLS, CSV exports. JavaScript • Tuesday May 24, 2022 | | |
02/22/2022 | Calculate Decimal Degrees from Degrees, Minutes, and Seconds | To calculate decimal degrees, we use the DMS to decimal degree formula below: Decimal Degrees = degrees + (minutes/60) + (seconds/3600) | |
02/04/2022 | Set specific date for Comiseo Daterangepicker https://tamble.github.io/jquery-ui-daterangepicker/# JavaScript • Friday February 4, 2022 | Set the variables Apply it as the dateStart | |
01/10/2022 | Play randomized functions JavaScript • Monday January 10, 2022 | | |
11/29/2021 | Initialize JavaScript Date to specific timezone JavaScript • Monday November 29, 2021 | The final timeNow will be a Date/Time object with a value specific to Mountain time. | |
11/17/2021 | Convert filepath to webdbpath (aka WebDbname) LotusScript • Wednesday November 17, 2021 | | |
09/29/2021 | Disabled keyboard on mobile device HTML • Wednesday September 29, 2021 | Add inputmode attribute with value none. | |
09/21/2021 | Add Spaces to Dock in Mac OS Mac • Tuesday September 21, 2021 | Launch Utilities > Terminal Execute the following code for each space you want They won't show up until you restart the Dock. | |
06/09/2021 | Custom Sticky logic when the native stick-top can't work There are a number of reasons why the CSS position: sticky property might not work such as browser compatibility, ancestor element has OVERFLOW property set, height is not set on parent element, or parent element is a flexbox. JavaScript • JQuery • Wednesday June 9, 2021 | Call the following javascript and jQuery when the DOM is ready. CSS | |
05/13/2021 | Separate multiple attached files into individual notes documents Use this agent code to break up the attachments into their own notes documents. LotusScript • Thursday May 13, 2021 | | |
03/14/2020 | Always show scrollbars in Safari via CSS CSS • Saturday March 14, 2020 | | |
03/02/2020 | Disable double-tap "zoom" option in browser on touch devices CSS • Monday March 2, 2020 | Add this css to the specific DOM object or all. | |
12/11/2019 | Ordinal Date Suffix 1st, 2nd, 3rd, 4th, etc... Lotus Formula • LotusScript • Wednesday December 11, 2019 | Formula LotusScript | |
11/01/2019 | How to stop iPhone auto-linking dates, phone numbers, or addresses The iPhone and iPad automatically adds hyperlinks to things it thinks it knows how to handle, like linking dates to the Calendar app and phone numbers to the dialer. (Several desktop email and webmail systems do this too, especially for dates.) HTML • Friday November 1, 2019 | An Example (iPhone adds blue links to the number and address): The iPhone will add blue links to the confirmation number (mistaking it for a phone number) and the address. Now add in a couple Zero Width Space characters: And it looks exactly the same as the original, but with no auto-linking of values. Bonus: This also works for disabling auto-linking in GMail. | |
07/21/2019 | Prevent save on ENTER, but allow ENTER to call other functions You can prevent the form from submitting, but still specify functions to execute when a user hits ENTER within a specific field or object. JavaScript • JQuery • Sunday July 21, 2019 | First, have this function called when the DOM is ready. The code below will allow ENTER keys on text areas, and look for the 'data-onenterkey' attribute value. If a function name was provided in the attribute, it will be executed. Create the custom function you want to call when the user hits the ENTER key on the specific input field Sample usage | |
07/03/2019 | Reload the page when user clicks the browser BACK or FORWARD buttons The popstate event will be triggered by doing a browser action such as a click on the back or forward button (or calling history.back() or history.forward() in JavaScript). JavaScript • Wednesday July 3, 2019 | | |
07/03/2019 | Capture the search clear event on search input fields HTML • JavaScript • JQuery • Wednesday July 3, 2019 | Sample html input search field Javascript/jQuery code to fire when the user clicks the clear button | |
06/24/2019 | Construct WebDbName in LotusScript Use this when you need to determine the web-friendly URL for the current database directly. LotusScript • Monday June 24, 2019 | | |
06/18/2019 | Move first row of a HTML table from tBody to tHead 1. Use prependTo() to insert the thead element 2. Use append() to insert the first tr inside the thead JQuery • Tuesday June 18, 2019 | | |
06/13/2019 | Re-enable the print layout option in Chrome I also had this problem with the latest Bootstrap v4.1.1. As a workaround, adding this css rule after Bootstrap js/css loaded. CSS • Thursday June 13, 2019 | | |
06/11/2019 | Set date without time via LotusScript This tip shows you how to set the date without the time section via LotusScript. Most methods for setting a date field via LotusScript leave you with a date in this format: 13/07/2014 00:00:00 GDT The time section always seems to get set either to the current time or 00:00:00. If the date is required to be stored in the same format as it would be if chosen from the date picker on a form, the time part must be removed. The LotusScript functions, CDat, DateNumber, DateValue, Format are no help here, nor is the notesddatetime object -- unless you do what I have done below. LotusScript • Tuesday June 11, 2019 | | |
06/06/2019 | Convert 12 hour to 24 hour time values Use the formula below in your Lotus Formula agent to convert values for specific fields. Lotus Formula • Thursday June 6, 2019 | All the values are in 5 minute increments, but you can adjust as needed. | |
06/06/2019 | Bootstrap and Prototype.js Conflict Features of Bootstrap that break: - Collapsible components bounce disruptively due to Effects. - Drop down menus parent disappears upon closing child. - Tooltip trigger/parent disappear on blur. - Popover trigger/parent disappears on blur or toggle. - Tabs disappear on trigger and toggle. With most of these issues, the cause is that Prototype.js applies display:none; to the parent element, making it disappear. JavaScript • JQuery • Thursday June 6, 2019 | Insert the following two code sections after your jQuery.js load, but before your call which is using the prototype.js functions. Bootstrap dropdown menu disappears when used with prototype.js Just put code below somewhere after prototype and jquery includes. Example of usage at the end of a page | |
05/31/2019 | Datatables header misalignment Issue when the table header columns are not fully aligned with the table body columns using datatables.net This can occur when the table is located within a modal window. Use either the CSS or JQuery methods below. CSS • JavaScript • JQuery • Friday May 31, 2019 | Add the following CSS or use the following JQuery code to re-adjust the column widths upon opening your modal | |
05/31/2019 | @Unique in LotusScript Lotus Formula • LotusScript • Friday May 31, 2019 | | |
04/15/2019 | Troubleshooting Java agent message 'Error cleaning up agent threads' Java • Monday April 15, 2019 | | |
02/18/2019 | Display attachment sizes in B, KB, MB, and GB Format the output of @AttachmentLengths into a more useful result. Lotus Formula • Monday February 18, 2019 | | |
02/21/2018 | URLQueryString for JQuery JavaScript • JQuery • Wednesday February 21, 2018 | | |
02/08/2018 | Basic sharing via email client Swift • Thursday February 8, 2018 | | |
02/08/2018 | Device height and width Swift • Thursday February 8, 2018 | | |
02/08/2018 | Prevent cache for URLSession Swift • Thursday February 8, 2018 | | |
01/21/2018 | Call function in ViewController from AppDelegate (tabbed app) Swift • Xcode • Sunday January 21, 2018 | Code for the AppDelegate.swift file | |
01/21/2018 | Call function in ViewController from AppDelegate (single view app) Swift • Xcode • Sunday January 21, 2018 | This is the section in AppDelegate.swift | |
10/15/2017 | Simple function to extract URL parameters LotusScript • Sunday October 15, 2017 | Add this function Usage example | |
10/14/2017 | Clear hashtag from address bar JavaScript • Saturday October 14, 2017 | | |
08/24/2017 | Force browser to always print the background colors, regardless of the user's settings CSS • HTML • Thursday August 24, 2017 | | |
07/14/2017 | How to Protect/Unprotect Multiple Worksheets At Once in Excel If you have a workbook contains multiple protected worksheets with the same password, and now you need to unprotect them for modifying some information. Maybe, you can unprotect the sheets one by one with Unprotect Sheet in Excel, but this will waste a lot of time when there are multiple sheets need to be unprotected. Here, I will introduce you some quick ways to unprotect multiple protected sheets. Microsoft Excel • Vba Script • Friday July 14, 2017 | For each of the code sections below: Protect Multiple Worksheets At Once Unprotect Multiple Worksheets At Once | |
07/12/2017 | Slowly hide success and error message divs and remove the query string from the URL When you display content based on the presence of a URL query string value. For example "http://website.com/page.html&smsg=You saved successfully" will display the message, fade out after X seconds (2.5 seconds below) and then remove the query string from the address bar to display just this "http://website.com/page.html" JavaScript • JQuery • Wednesday July 12, 2017 | Insert the code at the bottom of your page or in your subsequent JS library. | |
06/30/2017 | Mask email addresses from web-bots via jQuery This little snippet won't display the email address unless javascript is enabled in the browser, which web-bots do not run. The fully formatted email address won't be present in the html file, just in the browser ram. HTML • JQuery • Friday June 30, 2017 | Here's your markup for the anchor links. Href can be blank or not included at all. List the username and domain details for the email address in each respective attribute (data-user and data-domain). First we want to make sure the DOM has loaded 100% before proceeding. Then for each anchor with a class of "maskedEmail", the code will extract the values to assemble and populate the href value and text displayed. Alternate version with additional subject | |
06/18/2017 | Bootstrap 4 responsive tables won't take up 100% width As soon as you apply the .table-responsive class to a table, the table shrinks horizontally and no longer takes up 100% of the width. Bootstrap 4 • HTML • Sunday June 18, 2017 | The only solution so far is to use it as a wrapper: | |
05/21/2017 | Simple breakpoint viewer for Bootstrap 4 Just a convenient multi-colored block to assist while performing your layouts. Bootstrap 4 • Sunday May 21, 2017 | | |
03/14/2017 | Creating a modal window with HTML5 & CSS3 Modal boxes are a frequently utilized tool in the web developer’s arsenal. Used for, amongst many things, login/register forms; advertisements; or just notifications to the user. However despite the fact that modal windows frequently contain mission critical information, they are routinely created with JavaScript, which does not sit well with the best-practices of progressive enhancement or graceful degration. This doesn’t need to be a problem, because HTML5 & CSS3 allow us to create modal windows with ease. What we are going to do is use CSS3’s transition, opacity, pointer-event, and background gradient properties to create a very beautiful and functional modal box. CSS • HTML • Lotus Formula • Tuesday March 14, 2017 | Converted to Lotus Formula do it can be dynamically pasted in one or multiple fields. | |
09/05/2016 | Sort the div in alphabetical order using data attribute JavaScript • JQuery • Monday September 5, 2016 | Data sample | |
08/25/2016 | Deferring images without lazy loading or jQuery HTML • JavaScript • Thursday August 25, 2016 | Place this function either in your page header or shared JS file for reference on multiple pages. It will loop through all images that have a "data-src" attribute and use that value to replace the img object's SRC value. Structure your image HTML tag(s) with a blank image URL listed as the src or you can use a base64 image. Place the actual image SRC in the attribute data-src. | |
08/25/2016 | Using Multiple JavaScript Onload Functions Unfortunately, you cannot place multiple onload events on a single page. You can nest multiple functions within the one onload call, but what if you need to cascade an onload script across multiple pages, some which may already have an existing onload event? use the addLoadEvent function below. JavaScript • Thursday August 25, 2016 | The function below was written by Simon Willison. It has several advantages. For one, it's really unobtrusive. It can be placed in a file with your other scripts or in a separate file. (If it's in a separate file, just be sure to call it after the other files, so the functions will be available.) Also, it works even if the onload event handler has been previously assigned. Simon explains it like this: "The way this works is relatively simple: if window.onload has not already been assigned a function, the function passed to addLoadEvent is simply assigned to window.onload. If window.onload has already been set, a brand new function is created which first calls the original onload handler, then calls the new handler afterwards." Isn't that beautiful? So, if you already have a script that uses the onload event handler, you don't need to dig it out and change it, unless you want to. It also allows for extra code. Here's an example that calls two functions and adds a third, independent addLoadEvent: | |
08/07/2016 | Calculate time difference crossing midnight This formula will help you calculate the hours difference between two times, even when the end time crosses midnight (Ex 7pm - 2am) Excel • Sunday August 7, 2016 | The error code was added in case someone puts a non-date or numerical value in one of the input cells. | |
08/06/2016 | A true @Unique @Unique is case-sensitive, so "pear" and "Pear" and "PEAR" in a list will remain as three separate values. The formula below will truly return one value "Pear". Lotus Formula • Saturday August 6, 2016 | @Propercase is only applied when a duplicate value exists in the list. Otherwise the formula preserves the exact case of the list. tmpFROM and tmpTO are only applied when the item has been proper cased, as an extra cleanup for words you might not want proper cased. | |
07/23/2016 | Forcing immediate indexes to actually update immediately Have you found that your database's full-text index doesn't update immediately when you save a document, even when the frequency setting is set to "IMMEDIATE"? The UPDATE function on the server checks the queue every 5 seconds for new task requests, however it uses the "Update Suppression Time" setting to wait until multiple, similar requests get deposited in the queue before it runs. This can take up to 15 minutes to execute. Decreasing the suppression time interval on the server isn't a good solution since it will exponentially increase the load on the server's resources. And it still doesn't solve your problem because even a minute delay could frustrate a web user when their new document doesn't show up in search. So instead, the solution below will fire off the UPDALL routine directly in the server console for the specific database. | Insert the code below into an agent and make sure to change the "set runtime security level" setting to #3 Allow restricted operations with full administrator rights. (assuming your ID has sufficient rights on the server). Also be sure to add the %INCLUDE "lsxbeerr.lss". The "-F" parameter ensures that just the full-text index is updated, not the views. | |
07/19/2016 | Print the java version in your IBM Domino server Java • Tuesday July 19, 2016 | | |
03/12/2016 | Reserved fields for Lotus Domino web applications There are several reserved fields available. Lotus Notes Form • Saturday March 12, 2016 | $$HTMLFrontMatter $$HTMLTagAttributes $$HTMLHead | |
02/14/2016 | Force Ejecting a Disk - Mac In the event that a disk has become stuck in your Apple computer, there are several steps you can take to try to force it to eject. Mac • Sunday February 14, 2016 | Open a Terminal window and type in... Restart your computer, hold down the mouse button. If you have a 2-button mouse, hold down the left click. If your computer has an eject key on the keyboard, restart the computer again, this time holding the eject key. | |
07/01/2015 | Stack of Paper Simple, clean effect that works everywhere. CSS • HTML • Wednesday July 1, 2015 | HTML CSS | |
06/08/2015 | When "e.rowData" returns "undefined" in Android Appcelerator • Appcelerator Alloy • Monday June 8, 2015 | You can use e.row for both iOS and Android apps. | |
06/07/2015 | Convert a string from ISO-8859-1 to UTF-8 Use this handy LotusScript function to convert a string from ISO-8859-1 to UFT-8. Appcelerator • Appcelerator Alloy • LotusScript • XML • Sunday June 7, 2015 | http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/e80870ff9f7c692585256e7c00532f65?OpenDocument | |
05/08/2015 | Google Translate API Ajax via JavaScript You can perform specific word/sentence lookups against Google Translate via the AJAX the function below. JavaScript • Friday May 8, 2015 | You will need to go to the following address to create your own API Key before you can use it, but it's pretty straightforward. Just call the function below with the id values for the source field and the target field. | |
05/07/2015 | Force the simulator to use a specific language when performing a test run of your app. You can override the i18n 639-1 locale code so you can test your international apps. Appcelerator Alloy • Thursday May 7, 2015 | Insert the desired line below into the alloy.js file. | |
04/03/2015 | How to Solve Dropbox Problems Syncing This problem was caused by a conflict in Dropbox’s cache. Because a file with the same basic name and properties already existed, Dropbox wasn’t able to create the new file on our end. This isn’t always a problem, but it can be if the sun and moon are aligned in a certain way. Either way, you can solve these issues almost every time by clearing Dropbox’s hidden cache folder. This folder holds gigabytes of miscellaneous data collected during file downloads and sync processes in a series of smaller files with crazy alphanumeric names. This folder should reset itself every three days, though in cases where your Dropbox application is experiencing a conflict, you may not want to wait for the problem to resolve itself. Linux • Mac • Windows • Friday April 3, 2015 | Mac OS X Windows Linux Instructions provided from Locker Gnome. http://www.lockergnome.com/news/2012/05/31/dropbox-problems-syncing/ | |
02/19/2015 | How to show hidden files and folders in Mac OS X Finder How to reveal secret hidden files on the Mac OS X desktop: this Mac Finder trick displays hidden files and folders. Mac • Thursday February 19, 2015 | How to show hidden files using Mac Terminal How to hide hidden files again in Mac using Terminal | |
09/20/2014 | CSS overflow: hidden not working when parent div width is state as % and not px You want to use the percent to control the width of td. In each td there is a div which has a 100% width relative to parent element td. If so, the overflow:hidden of div will no effective. CSS • HTML • Saturday September 20, 2014 | For this issue, I suggest you set the layout of table as “fixed”. | |
09/01/2014 | Set a cookie to expire in 1 hour JavaScript • Monday September 1, 2014 | | |
08/30/2014 | Extract just the postal code from Google Maps v3 api AutoComplete JavaScript • Saturday August 30, 2014 | | |
08/28/2014 | URL Escape and Unescape JavaScript contains a handy built-in function, 'escape', that encodes text so that it can appear as part of a URL. For instance, the space character is changed to %20, ampersand to %3B, and so on. The 'unescape' function converts these "percent" codes back to their original representation. These are helpful functions to have available when you write Domino agents. These agents could use unescape to read arguments from their own URLs, and use escape when they need to print a new URL when they finish execution. LotusScript • Thursday August 28, 2014 | Escape Unescape | |
08/27/2014 | Convert a 24-hour time to a 12-hour time Converts 24-hour time to 12-hour time with an AM or PM designation. JavaScript • Wednesday August 27, 2014 | Examples: | |
08/21/2014 | Restart the JVM in Domino without rebooting the Windows server. This is a helpful agent when you have a minor memory leak that you can't isolate in your system. Over time, the JVM will eventually fill up and cause an Out-Of-Memory failure and you won't be able to perform any Java remote calls until you reset/restart the JVM to clear the memory. One method to do this is to reboot the entire Domino and/or Windows server, but this takes a lot of time and can't be called via LotusScript. The agent below will check the server log every five minutes and if it finds an out-of-memory error, it sends the "restart task http" command which will restart the entire JVM and notify you via email. This typically takes around 20 seconds to complete, so it's much more efficient that restarting the server. LotusScript • Thursday August 21, 2014 | Create the lotus script agent below on a schedule basis of every 5 minutes. It will also skip the restart if it has already been done recently. If you're having multiple JVM failures within the window of one log entry document, you should really address that issue instead of using this agent to clear it. Be sure to set the runtime security of the agent to "3. Allow restricted operations with full administration rights". "restart task http" is a wrapper around "tell http quit" and "load http" (a hard restart), whereas tell http restart does a "soft" restart only (faster and less intensive). | |
04/05/2014 | Prevent Domino from creating labels for checkbox/radio button field values Domino automatically creates a label for every value in a checkbox or radio button field. You can use this solution on a per form or server level to disable the automatic functionality. Lotus Notes Form • Saturday April 5, 2014 | THE PROBLEM: There's a field named Interest defined as a checkbox with 5 choices. But when Domino turns this into HTML, it is now generating this: While you can use passthru to put label tags around many types of fields, you can't for checkboxes and radiobuttons, so we added the automatic generation of the | |
03/27/2014 | Hide the first column in a child table Simple css to dynamically hide the first column in a table that's a child of another object. CSS • Lotus Notes View • Thursday March 27, 2014 | In the case below, the first column of the table that's inside the div "viewcontent" will be hidden. | |
03/22/2014 | Detecting orientation changes on mobile devices Simple way to detect orientation changes and positions. JavaScript • Saturday March 22, 2014 | | |
03/21/2014 | Modify all elements with a specific attribute The code example below was used on a default Domino calendar view template form. It removes the HREF values for the automatically generated links for each day (which annoyingly opens to a dual day view). Just call the function below in the onLoad event. Domino adds a target="_self" to all these links, so you can filter by them. JavaScript • Lotus Notes Form • Lotus Notes View • Friday March 21, 2014 | | |
12/19/2013 | Linear gradient for Internet Explorer CSS • Thursday December 19, 2013 | | |
12/03/2013 | Java.lang.Double.compareTo() Method The java.lang.Double.compareTo() method compares two Double objects numerically. There are two ways in which comparisons performed by this method differ from those performed by the Java language numerical comparison operators (, =, ==, = ) when applied to primitive double values: Java • Tuesday December 3, 2013 | Following is the declaration for java.lang.Double.compareTo() method RETURN VALUE: This method returns the value 0 if anotherDouble is numerically equal to this Double; a value less than 0 if this Double is numerically less than anotherDouble; and a value greater than 0 if this Double is numerically greater than anotherDouble. The following example shows the usage of java.lang.Double.compareTo() method. | |
11/27/2013 | Swap ComboxBox Values Use this when the choices for both field will be the same and you want to have a function that swaps them. JavaScript • Wednesday November 27, 2013 | | |
11/15/2013 | Setting DOCTYPE in Domino HTML • Lotus Notes Form • Friday November 15, 2013 | How can you change the doctype in Lotus Notes/Domino for the whole site or just one page? There is a solution IF you are using Domino 7.0.2 or higher. There are a couple of new web-specific system fields you can use on an as-needed basis. If you are on a version before 7.0.2, though, the notes.ini setting is the only way to get the complete doctype with elements treated as Notes content. HTML 5 HTML 4.01 Strict - This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed. HTML 4.01 Transitional - This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed. HTML 4.01 Frameset - This DTD is equal to HTML 4.01 Transitional, but allows the use of frameset content. XHTML 1.0 Strict - This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML. XHTML 1.0 Transitional - This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML. XHTML 1.0 Frameset - This DTD is equal to XHTML 1.0 Transitional, but allows the use of frameset content. XHTML 1.1 - This DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to provide ruby support for East-Asian languages). | |
06/04/2013 | Self-Contained FlyBox A simple layover popup with all inline styling, no external css. HTML • Lotus Formula • Tuesday June 4, 2013 | | |
05/30/2013 | Using META tags in Framesets The R5+ Frameset InfoBox does not contain an HTML Header object for use by the developer - meaning you can't easily include META tags, if you are using a Domino Frameset as your Home Page. Here's a way around it. | In the TITLE field on the Frameset InfoBox, enter the title text as you normally would - then add a little bit of PassThru HTML to the tail end of it like this: This will result in the following HTML from the Domino web engine: Welcome to Eclipse Education | |
04/23/2013 | Categorize documents by the week number for every year This column formula will group the entries into the correct number of weeks. Weeks start with Sunday and it also accounts for the overlap of days at New Year's. Lotus Formula • Tuesday April 23, 2013 | Insert in your categorized column. In the example below, "OrderDate" is the date field in the documents. | |
02/12/2013 | Show all checkbox values in read mode too! For when you always want to display the full list in edit and read mode. It will show which values are checked. HTML • Lotus Formula • Lotus Notes Form • Tuesday February 12, 2013 | Create a hidden "Computed For Display" field and name it "ChecklistChoices". Formula should result in a list array. Example: Create a standard checkbox field and name it "MyChecklist". Allow multiple values and have it only be visible in edit mode. Select "Use Formula For Choices" and enter the reference below. Create a "Computed For Display" field and name it "MyChecklist_disp". This field should only be made visible in read mode. Use the following formula: | |
01/03/2013 | FIX: Can't reset "allow selection of documents" Use this simple fix is to overcome the bug which prevents you from deselecting the "allow selection of documents" option in a notes view properties. Lotus Formula • Lotus Notes View • Thursday January 3, 2013 | In Designer, select menu Tools/Add Tool... Enter a name for the tool ("Remove web options" in this case), click "Run formula, and enter the following formula: Under Tool Context, select View Design and Folder Design. Click OK. You only need to do this once, and you can fix any view thereafter. Open the view in design mode, don't make any changes to it, and select menu Tools / Remove web options. You should find this selection at the end of the Tools menu. The view editing window will close, and the view should be fixed. | |
12/07/2012 | Random value picker Use this to randomly pick a single value from a @DBLookup, @DBColumn, or any other list array. Lotus Formula • Friday December 7, 2012 | Returns a single value Returns multiple unique values | |
11/27/2012 | Popup Layer with shaded background Use this package to create a modal-like popup layer to show text messages or images on the current window. You can customize any of the aesthetics via css and the content window will stretch vertically and horizontally based on the content. Good to avoid popup blockers and keep the user on the same page. CSS • HTML • JavaScript • Tuesday November 27, 2012 | CSS JavaScript functions HTML link to open the flybox HTML for the flybox itself. Can be placed anywhere on the page. | |
11/20/2012 | Fluid Text Resizer This is code provided by DynamicDrive.com and customized for a custom Lotus Domino implementation. I'm providing the code for my implementation along with the original files and a PDF with the original instructions. Custom Tools • HTML • JavaScript • Lotus Notes Form • Tuesday November 20, 2012 | Detach the "fluidtextresizer.js" file and upload to the Shared Resources > Files section of a database of your choosing. Paste this into the HTML Head Content of your form and adjust the path for the JS file accordingly. Here's the HTML for your buttons. Here's the CSS for the buttons.
You're done! This is the end of my custom implementation code. Attached below is the original code provided which has a few more selection options.
ORIGINAL HEAD CODE ORIGINAL HTML Original Posting on DynamicDrive.com | |
10/29/2012 | Max Width and Max Height for Images via CSS Lets you upload whatever dimension image you want and ensure that it can/will be displayed at a fixed max size limit, regardless of browser, and still maintain the aspect ratio. Some tweaks had to be made from the original documentation regarding IE8 and above. The code below works :) CSS • Monday October 29, 2012 | | |
09/18/2012 | List the image resources of a database LotusScript • Tuesday September 18, 2012 | | |
04/17/2012 | Encode and Decode string to/from URI Works well to encode and decode from @URLencode. Escape characters. JavaScript • Lotus Formula • Tuesday April 17, 2012 | | |
04/13/2012 | Get the number of weeks this year for a specific date Lotus Formula • Friday April 13, 2012 | | |
08/19/2011 | Countdown Timer Simple countdown timer in minutes and seconds. 00:00 JavaScript • Friday August 19, 2011 | Insert the in your JS Header Insert this when you want the timer to be displayed. | |
08/16/2011 | Specifies which day of the week the calendar view shows calendars | Short Description: pecifies which day of the week the calendar view shows when showing a week view Description: This setting specifies which day of the week the calendar view shows when showing a week view. Valid Values 1 though 7, where Sunday=1 Monday=2 Tuesday=3 Wednesday=4 Thursday=5 Friday=6 Saturday=7 Default value: None Syntax: ViewWeekStart=1 to 7 Example: ViewWeekStart=2 | |
02/02/2011 | Resize images dynamically in the browser. Use "visibility:hidden" instead of "display:none" since IE can't determine an image size when hidden. JavaScript • Wednesday February 2, 2011 | Set maximum bounds for width and height. Just set maximum bounds for width, let height remain dynamic. | |
01/25/2011 | Resize the TEXTAREA property with CSS3. Applies to Safari and Chrome, hopefully IE too one day ;-) CSS • Tuesday January 25, 2011 | resize:both; resize:horizontal; resize:vertical; resize:none; | |
03/27/2010 | Remove single character via JavaScript JavaScript • Saturday March 27, 2010 | | |
03/22/2010 | Detect browser window resize (height and width) Allows you to trigger an evert when the browser window is resized and use the returned height and width to adjust other objects on the page. For example, you can use it to resize a div box on the page that you always want to be 30px less on each side of the window. Using width =100% and margin doesn't always display consistently across different browsers and edge borders skew the margins. This solution works regardless of margins, padding, and content. Will work for most browsers (IE, Firefox, Sarari, Chrome, etc...) JavaScript • Monday March 22, 2010 | Add to your JS Header Add to the Body attributes of the page. | |
03/18/2010 | Rounded Corners CSS • Thursday March 18, 2010 | | |
03/10/2010 | A better way to display Domino attachments Tired of the no-frills way Domino displays attachments on the web for your users? This solution will allow you to choose where and how they're displayed, complete with the appropriate icons. It's setup for an individual deletion button for each file, but could be easily adapted to use checkboxes and allow multiple file deletions. I just prefer single click over the checkboxes and save buttons. I've attached a library of 100+ file type icons in various sizes and a database example. This package is comprised of 8 steps. All the elements above should be hidden in read-mode, except for step 5 which should only be hidden when @Attachments=0. Custom Tools • Lotus Formula • Lotus Notes Form • Wednesday March 10, 2010 | STEP 1: "deleteAttachment" JavaScript function for deletion STEP 2: "ReturnOverride" Editable (hidden with style CSS) Note that you must have the "id" property set to "ReturnOverride" and reminder that JavaScript is case-sensitive :) STEP 3: "ReturnOverrideReset" ComputedForDisplay field with JavaScript function to simply clear the "ReturnOverride" field each time the document is opened in edit mode. STEP 4: hidden html fields: "%%Detach" and "delattachReturnURL" STEP 5: "attachedfiles_disp" ComputedForDisplay field to show the file icons, names, sizes, and deletion buttons. STEP 6: "$$Return" field to allow the page to reload appropriately. This will allow the page to refresh when a file is deleted, and return to the view when your existing @Command([FileCloseWindow]) formulas are used. STEP 7: Create a ComputedForDisplay field on your form entitled $V2AttachmentOptions and set the default value to "0" STEP 8: File Upload Control, upload button, and bookmark | |
03/07/2010 | Sending multi-part MIME emails (HTML and Plain Text) This is an example of our current GigaChef newsletter. This agent is used for testing and pulls the content and imagery from the document. Both the HTML version and Plain text version are contained within the single email. Emails clients with HTML enabled will automatically display that version, otherwise the plain text version is displayed. CSS • HTML • LotusScript • Sunday March 7, 2010 | (Declarations) Note that the call to build the plain text version must come before the HTML part. HTML CONTENT: Constructs the HTML content from the document. Note 1: that it is ideal to place carriage returns "Chr(10)" in your code since many POP3 mail servers have a limitation of 655 characters per line of code. Note 2: Also it's recommended to have all class declarations in the header CSS be explicitly stated (div.classname {color:#FF3300;} instead of just (.classname{color:#FF3300;}) since many mail servers/filters will strip out all non-explicit CSS code when the users forwards the email. PLAIN TEXT CONTENT | |
03/02/2010 | Transparent backgrounds Works in Internet Explorer, Firefox, Sarari, and Chrome. CSS • HTML • Tuesday March 2, 2010 | | |
01/15/2010 | @ReplaceSubstring in JavaScript (v2) JavaScript • Friday January 15, 2010 | Replaces all instances of the given substring. USAGE | |
11/02/2009 | Open server and loop thru all databases Simple code to open a specific server and list all the visible databases. LotusScript • Monday November 2, 2009 | | |
09/22/2009 | Find and replace text in a web page with javascript and arrays HTML • JavaScript • Lotus Formula • Tuesday September 22, 2009 | ComputedValues 1 thru 4 | |
04/06/2009 | @URLQueryString in Java A down and dirty easy version which returns the value of the key passed Java • Monday April 6, 2009 | CLASS EXAMPLE USAGE | |
04/05/2009 | Determine the rootpath in Java Simple approach using a replacesubstring function Java • Sunday April 5, 2009 | PLACE THIS FUCNTION DIRECTLY ABOVE public void NotesMain() { USING THE FUNCTION | |
04/05/2009 | Lotus Notes Java agent to return ajax call values or redirect browser to another page. This is a basic template for a java agent. It can be called directly from a button or from a URL. It can return variables for AJAX calls or redirect the browser to another URL. Java • Sunday April 5, 2009 | | |
04/05/2009 | @ReplaceSubString in Java Java • Sunday April 5, 2009 | | |
03/31/2009 | Convert hex color to RGB Simple conversion formula Lotus Formula • Tuesday March 31, 2009 | DISPLAY ONLY DISPLAY AND SORT IN NUMERICAL ORDER | |
03/27/2009 | Pass variables to LotusScript agent via URL LotusScript • Friday March 27, 2009 | Calling the function | |
03/27/2009 | Change table spacing via CSS Control the cellspacing and cellpadding with CSS (works in IE too!) CSS • Friday March 27, 2009 | | |
03/27/2009 | @Left, @Right, @LeftBack, @RightBack, @Middle equivalents in JavaScript Simple equivalents to these Lotus Notes formulas JavaScript • Friday March 27, 2009 | @Left @Right @RightBack @LeftBack @Middle | |
03/25/2009 | @LeftBack and RightBack equivalent in LotusScript LotusScript • Wednesday March 25, 2009 | @LEFTBACK @RIGHTBACK | |
12/15/2008 | Simple amount formatting with thousands and decimals. Includes whole numbers or numbers with decimals LotusScript • Monday December 15, 2008 | | |
11/11/2008 | Write the full day, date and year The following code will output the date in the form of "Sunday, November 27th, 2005": JavaScript • Tuesday November 11, 2008 | | |
11/10/2008 | Current web username Retrieve the current webusername from an agent called via OpenAgent and "use current web user" LotusScript • Monday November 10, 2008 | | |
10/21/2008 | Change the Universal ID The java agent code allows you to find a document by UNID and change it to another value. Once run, it will create a new document with that ID. Them you can delete the original. Java • Tuesday October 21, 2008 | | |
08/17/2008 | Pass date string to Notes date field Java • Sunday August 17, 2008 | | |
08/16/2008 | Highlight table row on mouseover CSS • HTML • Saturday August 16, 2008 | | |
08/12/2008 | Custom MP3 Flash Player This is a simple MP3 player that can be embedded into any HTML and play a referenced MP3 file. You just need to upload the attached swf file to the "FILES" design element section and insert your formula/HTML. Flash • HTML • Lotus Formula • Lotus Notes View • Tuesday August 12, 2008 | EXAMPLE: View Column | |
08/09/2008 | @ReplaceSubString in LotusScript (v2) LotusScript • Saturday August 9, 2008 | | |
08/09/2008 | Parse values from NVP strings LotusScript • Saturday August 9, 2008 | | |
07/29/2008 | Random number generator within a specific range LotusScript • Tuesday July 29, 2008 | | |
07/29/2008 | Insert text into specific area of textarea field The example below is used to inject html bold, italic and hyperlink tags around the highlighted text in a field. HTML • JavaScript • Lotus Notes Form • Tuesday July 29, 2008 | JS HEADER Here's the JavaScript to place in your buttons. One for BOLD, ITALICS, and LINKS. | |
07/22/2008 | @Left and @Right equivalent in Excel formula Spreadsheet • Tuesday July 22, 2008 | | |
07/05/2008 | Loop thru checkboxes and compile values from selected JavaScript • Saturday July 5, 2008 | | |
07/02/2008 | Stamp reader-field agent This simple agent stamps two reader fields on every selected document with a static role value. LotusScript • Wednesday July 2, 2008 | | |
06/21/2008 | Simple image rollover swap HTML • JavaScript • Saturday June 21, 2008 | | |
06/15/2008 | Display inline-block correctly on Mozilla. CSS • Sunday June 15, 2008 | | |
06/13/2008 | Use AJAX to perform DBLookups and view searches This is the basic package of code you need to perform an AJAX lookup for single or multiple values. JavaScript • Lotus Notes View • Friday June 13, 2008 | | |
05/15/2008 | IE6 glitch for CSS drop-down menus Drop down menus will not work correctly in IE6 without calling the following function. HTML • JavaScript • Thursday May 15, 2008 | Place the code below after the $$ViewBody field or your embedded view. | |
04/09/2008 | Autocomplete How to disable autocomplete on a field HTML • Wednesday April 9, 2008 | | |
03/11/2008 | Process selected documents on the web (v2) This is a hybrid between my legacy code and ViewProcessor code from Jake Howlett (Codestore.net 2003). The problem with the legacy code was that $$ViewTemplates don't execute WebQuerySave agents. Attached sample database - Used for the INBOX view template to change the status to "unread" or "saved" JavaScript • Lotus Formula • Lotus Notes View • LotusScript • Tuesday March 11, 2008 | This is how it works: 1. User clicks the action button (mark as unread) which performs a javascript loop, creating an array of all $$SelectDoc values on the default Domino form. 2. Then the javascript code passes the array to an additional HTML form appended to the bottom of the $$ViewTemplate. 3. This HTML form has two fields, 'docunids' and 'status' and an action to create a document using a specific form name (another notes form). 4. There needs to be another Notes form in the database with the same form name, two fields and agent called in the WebQuerySave event. 5. The agent called will pickup the values in the "docunids" field and process. $$Return on the Notes form will redirect the browser accordingly. ADD THIS JAVASCRIPT TO THE JSHEADER NOTES AGENT - BatchStatusChangeAgt | |
03/11/2008 | insert checkbox web selection JavaScript • Tuesday March 11, 2008 | | |
03/08/2008 | Change the background color of a div on hover over Simple mouse event code to change the color when the user places the mouse over the div. CSS • JavaScript • Saturday March 8, 2008 | | |
03/08/2008 | Select/Deselect all via JS Better lightweight code to toggle the status. JavaScript • Saturday March 8, 2008 | CALLING THE FUNCTION | |
03/08/2008 | Changing "No documents found" messages Simple code to change the default message. JavaScript • Saturday March 8, 2008 | | |
03/07/2008 | Simple @For Loop Simple @For loop to add placeholder text Lotus Formula • Friday March 7, 2008 | | |
03/05/2008 | Programmatically replace the design of Lotus Notes databases A similar situation arises when trying to programmatically replace the design of a Lotus Notes database. IBM doesn't provide a LotusScript method or C-API function to accomplish this task. In fact, the only way to replace a database design is by manually choosing File - Database - Design Replace for each specific database. However, this manual method doesn't make much sense when replacing the design of several databases. The following LotusScript code can be used to replace the design of multiple databases. The script actually deletes all design notes from the target database and copies them from the source database. LotusScript • Wednesday March 5, 2008 | Note: The author would like to thank Mr. Ramesh Chand Beniwal and Ms. Neha Agarwal for their help in developing this LotusScript code. SearchDomino.TechTarget.com | |
02/26/2008 | Display siblings linking Use this automatic code to display all sibling links on a document Lotus Formula • Lotus Notes Form • Tuesday February 26, 2008 | | |
02/26/2008 | @ReplaceSubString in JavaScript (v1) A generic LotusScript function to mimic @ReplaceSubstring is described. This is a JavaScript version of that function. It handles several situations. For example: JavaScript • Tuesday February 26, 2008 | SAMPLES Here's the function | |
02/12/2008 | Place a div on the absolute bottom of a page Use the CSS to automatically ensure that a DIV appears at the bottom of a page. CSS • HTML • Tuesday February 12, 2008 | | |
01/22/2008 | Sending HTML emails with Attachments via SMTP This code is basic, but works well. LotusScript • Tuesday January 22, 2008 | | |
12/05/2007 | Redirect browser to HTTP if url is HTTPS A reverse redirection to prevent HTTPS session. JavaScript • Lotus Formula • Wednesday December 5, 2007 | | |
11/29/2007 | Autoclose the window after inactivity This tutorial teaches you how to use JavaScript to set an inactivity timer and close a browser window. Provides a warning message using a hidden DIV. HTML • JavaScript • Thursday November 29, 2007 | Activity includes keyboard activity and mouse movement. The value of timePeriod in the example script represents 5 seconds (5000 milliseconds). Change to suit. For example 5 minutes = 300000 (1000 ms * 60 seconds * 5 minutes). The variable "warnPeriod" sets the amount of time that the warning div will appear before the window closes if the timer isn't reset. Step 1. Enter script below on Between Head Tags tab in Layout HTML. Note: use MasterBorder HTML if you wish to apply script to pages sharing a common Master Border Step 2. Enter following code on Inside Body Tag in Layout HTML (all on one line) Step 3. a) Place a text box on your page where you want warning to appear. b) Press Ctrl+T and paste in the DIV code below. Feel free to modify the appearance. Change text to match actual time period set in script. The contents of the div only appear when the timer runs down. Clicking on cancel closes the div and resets the timer. | |
11/29/2007 | Hide the last total row in a Domino view Insert the code below in the onLoad event of the form to automatically hide the last row. Typically used in total views to hide the grand total on the bottom. HTML • JavaScript • JQuery • Thursday November 29, 2007 | | |
11/18/2007 | Prevent backspace for form, but allow for fields This code prevents the user from using the backspace key to page back, but still allows it within text and textbox fields JavaScript • Sunday November 18, 2007 | JS Header Insert the following call in the body onKeyDown event | |
10/25/2007 | Apply a formula to each value in a list field The formula below translates each value in the "website" field to insert the "http://" prefix if needed. It uses the new @Transform which applies a formula to each value. Lotus Formula • Thursday October 25, 2007 | | |
10/24/2007 | Get current date time the name says it all Java • Wednesday October 24, 2007 | | |
10/11/2007 | Countdown timer Here's a simple countdown timer for the screen using a DIV instead of HTML field HTML • JavaScript • Thursday October 11, 2007 | | |
09/17/2007 | Pass a page-break to Word & PDF Insert the code in your HTML when generating Microsoft Word documents and Adobe Acrobat PDF files. HTML • LotusScript • Monday September 17, 2007 | INSERT THIS CSS CODE IN YOUR HEADER INSERT THIS CODE EVERYWHERE YOU WANT A PAGE-BREAK | |
09/05/2007 | Insert page breaks when creating Word documents with HTML and LotusScript Maybe you'd like a page break at a specific point to keep a particular look. You do that by setting up a class of page breaks. You can set up the class on any HTML command, but I think the best method is to set up the class within paragraph tags. That way there's some white space where the page can break. Here's a look at the format (this will sit between your HEAD tags): HTML • Wednesday September 5, 2007 | | |
09/05/2007 | Force Word to open the newly created document in "print" view mode Use this code when creating Word documents via HTML from LotusScript. It allows you to pass variables to the Word translation code upon first opening. HTML • LotusScript • XML • Wednesday September 5, 2007 | | |
08/16/2007 | Scroll the page to the current object This code will allow you to scroll the page in javascript to the current selected object JavaScript • Thursday August 16, 2007 | | |
05/03/2007 | Pass variable to agent via URL This is a way to pass a single variable to an agent. Simple modifications can be made to the loop for multiple values. HTML • LotusScript • Thursday May 3, 2007 | | |
04/29/2007 | Prevent form submit on web Insert the code below in the form's onkeypress event JavaScript • Sunday April 29, 2007 | | |
04/18/2007 | Create a dynamic year array in formula Creates an ascending array of years ending with this year. (2004, 2005, 2006, 2007, etc...) Lotus Formula • Wednesday April 18, 2007 | | |
09/12/2006 | Auto-suggest v3 Basic auto-suggest functionality using only javascript HTML • JavaScript • Tuesday September 12, 2006 | Paste this code into an external JavaScript file named: autoComplete.js Paste this code into the HEAD section of your HTML document. You may need to change the path of the file. Paste this code into the BODY section of your HTML document | |
09/12/2006 | Auto-suggest v2 Auto Suggest with Javascript (#2) from www.go4expert.com CSS • Tuesday September 12, 2006 | THE JAVASCRIPT: THE CSS: THE HTML: | |
09/11/2006 | Type-Ahead/AutoSuggestion for web text fields Use this code to add type-ahead functionality for your web text fields. You can use a computed text field to perform @DbLookups or @DbColumns to produce the source datalists. It must be set to multi-valued with a comma delimiter. Each entry field must have a unique "Id" value assigned (example "Ingredient01") The code in the Onload event sets-up each field. The JSHeader code has two sections, the static standard reusable code and the source custom section which you cater to your source computed fields. HTML • Lotus Formula • Monday September 11, 2006 | JSHEADER OnLoad | |
06/02/2006 | Display the difference between two date/time values Returns the difference in a clean text readable format. Includes both a LotusScript and formula version. Lotus Formula • Lotus Notes View • LotusScript • Friday June 2, 2006 | LOTUSSCRIPT VERSION - Displays the most appropriate text string based on the date/time difference. For Example : "2 days ago", "1 year ago", "3 months ago", "less than a minute ago" FORMULA VERSION | |
05/31/2006 | Unicode popup on key event trigger HTML • JavaScript • Wednesday May 31, 2006 | | |
05/22/2006 | Open an external file/application Simple code to append at the end of a function or agent to open up the generated file or other file. LotusScript • Monday May 22, 2006 | (Declarations) Put this wherever you want to invoke the function | |
05/22/2006 | Trim all blank spaces from a string This function will automatically strip out any leading and trailing spacers from a string. JavaScript • Monday May 22, 2006 | | |
05/03/2006 | Auto-center popup layer in a window JavaScript • Wednesday May 3, 2006 | These are your parameters to determine where the window will be positioned. PLACE IN JSHEADER THE OBJECT YOU WANT TO FLOAT | |
04/26/2006 | Disable radio buttons Normal fields can be disabled using a single line of code. Radio button fields require you to loop thru all instances and disable each one. JavaScript • Wednesday April 26, 2006 | TEXT FIELDS RADIO BUTTON FIELDS | |
04/18/2006 | Clearing replication cut-off date This method works but has a potential risk of deleting data if the function gets interrupted. Use the property "CutOffDelete" of the class "NotesReplication". When you switch from enable to disable the cutoff date in that field will also be deleted. After that use the method save(). Important: Be sure not to use the method rep.save() when cutoffdelete is set to true! Otherwise this will result in loss of data!!! LotusScript • Tuesday April 18, 2006 | | |
04/05/2006 | Format numbers to currency format Use the three subfunctions below to reformat any amount in a currency format, complete with commas for thousands delimiter and two decimal points. (Example: 12,345.00) JavaScript • Wednesday April 5, 2006 | FUNCTIONS CALLING FUNCTION SAMPLE | |
03/22/2006 | Retrieve the "added in this file" time/date stamp value for a document This agent will retrieve the value of the "Added In This File" property of a notes document and populate it in string field for easy reference. LotusScript • Wednesday March 22, 2006 | (Declarations) | |
03/06/2006 | Preload images with CSS Simple HTML CSS code to preload images and hide them. CSS • HTML • Monday March 6, 2006 | | |
03/06/2006 | Get today's date as string Build a custom date string from today's date JavaScript • Monday March 6, 2006 | | |
03/04/2006 | Control twisty URLs in embedded views Control twisty URLs in embedded views JavaScript • Lotus Notes View • Saturday March 4, 2006 | | |
03/04/2006 | Modal window JavaScript • Saturday March 4, 2006 | | |
03/01/2006 | Hide all elements with the same id The code below will hide all elements with the id="XYZ123" JavaScript • Wednesday March 1, 2006 | | |
02/24/2006 | Show Hand curson onmouseover Helpful when creating links over images without hotspots. HTML • JavaScript • Friday February 24, 2006 | | |
02/23/2006 | Re-associate one doc to another This code was used to manually re-associate two records. The user just selects the two records and the agent code automatically determines which one is the parent and which one is the child. Then it performs the re-association and saves. LotusScript • Thursday February 23, 2006 | | |
02/23/2006 | Re-associate children docs to their respective parent doc by a field value. This was used to re-associate "database access profiles" to each user's "user profile" LotusScript • Thursday February 23, 2006 | | |
02/22/2006 | Hide content based on OS The code example below hides some hyperlinks based on the users operating system HTML • JavaScript • Wednesday February 22, 2006 | 1) the style tag in each DIV tag hides each link by default. 2) The togglelink function in the onload event determines which link should be made visible. | |
02/22/2006 | Detect the operating system on the client machine? To detect the operating system on the client machine, your script should analyze the navigator.appVersion string. Below is a simple example of a script that sets the variable OSName to reflect the actual client OS. JavaScript • Wednesday February 22, 2006 | | |
02/21/2006 | Reload the page automatically every x minutes. Reload every 20 minutes, forces the browser to return to Login page after server timeout JavaScript • Tuesday February 21, 2006 | | |
02/10/2006 | OK/Cancel prompt with carriage returns This is a sample OK/Cancel prompt for the user to proceed, which includes carriage returns ( \n ). JavaScript • Friday February 10, 2006 | | |
02/09/2006 | Create a dynamic 24 pay cycle array based off a start date of the 15th or last day. A date string with a day of the 15th or last day (28th, 29th, 30th, 31st) is provided and a dynamic array with 24 cycles is created starting with that date. LotusScript • Thursday February 9, 2006 | | |
02/07/2006 | Click another link Use this easy code to click another button. The target button can be hidden via javascript and contain Notes formula functions. JavaScript • Tuesday February 7, 2006 | | |
02/01/2006 | Export any Notes view to Excel (January 2006 v3) This code works, but need to review it later for differences. Lotus Notes View • LotusScript • Wednesday February 1, 2006 | (Declarations) Sub Click | |
01/27/2006 | Import Excel files directly into new Notes documents (v2) Drop this code into a view action button or agent. It will automatically create the fields based on the first row values of the XLS file. The only configurable variable that needs to be set is the desired form name for the new records. THIS ONLY DIFFERENCE IS THIS CODE FROM VERSION 1 IS THAT IT WILL STRIP OUT ANY/ALL SPACES FROM THE FIELDNAMES AUTOMATICALLY. LotusScript • Friday January 27, 2006 | This function will allow you to import data directly from Excel spreadsheets into Notes. The desired fieldnames must be provided in the first row and can not start out with numbers or symbols. | |
01/26/2006 | Import Excel files directly into new Notes documents (v1) Drop this code into a view action button or agent. It will automatically create the fields based on the first row values of the XLS file. The only configurable variable that needs to be set is the desired form name for the new records. LotusScript • Thursday January 26, 2006 | | |
01/18/2006 | Format a text field to display a monetary value. This code consists of one parent function and two child sub functions. Example 100,000.00 JavaScript • Wednesday January 18, 2006 | EXAMPLE USE: | |
01/17/2006 | SelectAll/DeselectAll for single or multiple values. Javascript sometimes treats checkbox fields differently if they only have one value. It's treated as an array if multi-values exist and a standard string field if only one exists, thus the method of selecting and deselecting all must account for this. The code below checks the length of the fieldname object. A single value will return false to a length call. JavaScript • Tuesday January 17, 2006 | | |
01/12/2006 | Return full text string of a date Will return the full text string for a date (December 31, 2005) when passed a date string value. LotusScript • Thursday January 12, 2006 | | |
01/12/2006 | Re-association tool for parent/child documents. The code below was placed in an agent to re-associate user responses (children) to a different data request (parent). The variables and conditions can be easily modified to suit your needs LotusScript • Thursday January 12, 2006 | | |
01/10/2006 | Hide a field via javascript command line can be used in field and form events JavaScript • Tuesday January 10, 2006 | TO HIDE TO DISPLAY | |
01/06/2006 | Convert a text date/time field to date only string using lotusscript Same as formula function "@Date(@TextToTime(@Text(FIELDNAME)))" LotusScript • Friday January 6, 2006 | | |
01/03/2006 | Force an Excel cell to be a text label type regardless of data. This is helpful when exporting on the web to Excel and numbers have leading zeros or extremely long numerical values and truncation is not desired. HTML • Tuesday January 3, 2006 | | |
12/19/2005 | Disable/enable a field You can call this from within the field itself or from other fields JavaScript • Monday December 19, 2005 | EXAMPLE: This code example hides the four fields based on which value has been selected in the combobox field. | |
11/12/2005 | Count the number of weekdays between two days This formula will count the total weekdays between two days. Lotus Formula • Saturday November 12, 2005 | | |
10/27/2005 | Provide Javascript prompt from backend LS agent and redirect browser back one page JavaScript • Thursday October 27, 2005 | | |
10/26/2005 | Force download in browser LotusScript • Wednesday October 26, 2005 | | |
10/20/2005 | Escaping characters for XML output. Just drop the function below and make the call as shown below. You can either replace each value with a tilde (~) or HTML hex codes. LotusScript • Thursday October 20, 2005 | Calling the function | |
10/19/2005 | Get document collections by using date ranges. This code will execute very efficiently on the web to retrieve collections of documents based off a date range the user specifies. It uses the DateRange class as the key for the view. The view may not be categorized, otherwise inconsistent results will be returned. LotusScript • Wednesday October 19, 2005 | | |
07/26/2005 | @ReplaceSubString in LotusScript (v1) LotusScript • Tuesday July 26, 2005 | | |
07/12/2005 | Categorize by fiscal year Simple formula to dynamically sort by Fiscal Year Lotus Formula • Tuesday July 12, 2005 | | |
04/12/2005 | Export any Notes view to Excel (Updated April 2005) The code below, when dropped into a LotusScript view action button, will dump the entire view contents to Microsoft Excel. This has been modified from a previous version which had a few glitches. This revised code will account for any/all hidden columns and truly export the value being displayed in the view column (fixes date issues). LotusScript • Tuesday April 12, 2005 | (Declarations) Sub Click | |
04/02/2005 | Read, convert to an array and rewrite the contents of a table cell. Reads and rewrite the contents of a cell table. It sets the HTML contents of the cell to an array and then rewrites all the content except for the 1st and last 2 indexs of the arrays. HTML • JavaScript • Saturday April 2, 2005 | | |
04/02/2005 | Read, extract X number of characters and rewrite the contents of a table cell. Reads and re-write the contents of a cell table. It removes the first X characters before re-writing. JavaScript • Saturday April 2, 2005 | | |
04/01/2005 | Set a specific listbox/combobox value in JavaScript Loops through all the options and stops when if finds the desired value, in this case, "Finland" and marks it as selected. JavaScript • Friday April 1, 2005 | | |
03/25/2005 | iFrames and layers This code allows you to embed a second page on the existing page in a new layer on top. CSS • HTML • Friday March 25, 2005 | | |
03/23/2005 | Export any view dynamically to a comma quote delimted text file The code below, when used in a view action button, will dynamically export the entire contents of the view to a text file in the C:\Temp directory. The user will be prompted for the desired filename and if they wish to include the column titles as headers. The code will retrieve the actual values displayed in the view, not the back-end fields, which is helpful when columns are combined field and text values. Also is helpful with date formats, ensure that date fields export in the format consistent with the user's local settings. Lotus Notes View • LotusScript • Wednesday March 23, 2005 | | |
03/18/2005 | Countdown Timer Will generate an auto countdown timer to whatever date/time you specify HTML • JavaScript • Friday March 18, 2005 | | |
02/22/2005 | Display current roles of a database in a field. The PostOpen event code below will populate the "CurrentRoles" field when the document is opened. LotusScript • Tuesday February 22, 2005 | | |
02/21/2005 | Blank out default field value when a field gets focus and reset if field looses focus blank. This functionality saves your users time from having to remove the default placeholder value each time they go to populate the field. An date field example has been provided below. MM/DD/YYYY are pre-populated in the fields and automatically disappear when the cursor moves the the field. The code example below was used on the "YYYY" field and the "this" handle allows you drop this code in any field without having to have specific field references. JavaScript • Monday February 21, 2005 | | |
02/05/2005 | iFRAME nested in table behavior in Safari. Resolves the problem the Safari browser has in displaying iframes within a table. Simple insert your iframe contents inside the DIV and it will display correctly. CSS • HTML • Saturday February 5, 2005 | CSS HTML | |
01/29/2005 | Check to see if the ENTER key was pressed. This code will trap if the ENTER key was pressed in both Internet Explorer and Netscape browsers HTML • Saturday January 29, 2005 | | |
01/29/2005 | Position the current window to the upper left portion of the screen This code will move the current window to the x=0 and y=0 position on the screen JavaScript • Saturday January 29, 2005 | | |
01/28/2005 | Determine the user's web access rights Determine the access level and deletion rights Lotus Formula • Friday January 28, 2005 | | |
12/30/2004 | Prevent parent documents from being deleted from a db when children documents exist. Insert the code below into the Querydocumentdelete database script. LotusScript • Thursday December 30, 2004 | | |
12/15/2004 | DatePicker for the web This is as user friendly as it gets. The core of this Date Picker code is housed in a single subform, then all you need to do is append some small html after each date field you want to use it with. You can use this multiple times on the same form. Custom Tools • HTML • JavaScript • Wednesday December 15, 2004 | INSTRUCTIONS FOR IMPLEMENTING Subform content | |
12/10/2004 | Have a categorized column text clickable to expand/collapse This code simple looks at the twistie code to the left on the screen and clicks it. "Category" is the actual field value In the example below. HTML • Friday December 10, 2004 | | |
12/06/2004 | Hiding a field from visibility but remains for javascript functionality Using this attribute will allow the field to be visibily hidden but still accessible by javascript functions. Lotus Formula • Monday December 6, 2004 | | |
11/30/2004 | How can I check where a visitor has come from? The code below will display the URL the user was just at before entering your page. JavaScript • Tuesday November 30, 2004 | | |
11/30/2004 | Display a popup alert with a variable name when the Esc key is pressed. The code number below can be replaced with any other key number. JavaScript • Tuesday November 30, 2004 | | |
11/22/2004 | Open a popup window exactly at the mouse position. The code below retrieves the x & y coordinates of the current mouse position and opens the popup window there. JavaScript • Monday November 22, 2004 | | |
11/17/2004 | Dynamic title bar date-time clock This code will place a dynamic and self-refreshing clock in the title of your web page JavaScript • Wednesday November 17, 2004 | Just paste the following script into the ... of your page. There are no other set-ups needed. | |
10/20/2004 | Return only selected values in a listbox Extract all the selected values of a listbox field JavaScript • Wednesday October 20, 2004 | | |
10/20/2004 | Universal getFieldValue function This function grabs the value from a passed in field. You should pass in the handle to the field, as in "document.forms0.MyField". The return value is either a string or an array, depending on the field type (a check box would return an array). JavaScript • Wednesday October 20, 2004 | | |
07/27/2004 | Replace a single specific character in a string The LotusScript version of @ReplaceSubstring. The example below was used to take a Windows filepath and convert it to a URL filepath. LotusScript • Tuesday July 27, 2004 | | |
07/27/2004 | Inserting an attachment into a Notes document Attach a file to a Notes document via LotusScript LotusScript • Tuesday July 27, 2004 | | |
07/22/2004 | Open a Notes database in the Notes client from a web browser. Use the syntax below to open any Notes database in the Notes client from a trigger within a web page. HTML • Thursday July 22, 2004 | | |
07/14/2004 | Forcing cells to be formatted as numbers for Excel. This was required after a strange error began occuring where all cells after the 42nd row would begin being formatted as text, regardless of the formatting you specify and number value. Inserting the =Sum formula seemed to resolve the problem and the totals work correctly. LotusScript • Wednesday July 14, 2004 | | |
06/24/2004 | Remove and replace all carriage returns in a string to blanks. Insert this code in the input translation of a field to remove and replace the carriage returns. Lotus Formula • Thursday June 24, 2004 | | |
06/24/2004 | Extract the current web document to Excel The agent below extracts the current active web page data to excel. There's a subfunction inserted in the code below to parse out a long comments field to 130 characters per line over multiple varying lines to maintain the table on one page. HTML • LotusScript • Thursday June 24, 2004 | | |
06/23/2004 | How do I force / control page breaks in DominoPDF? Custom coding examples from Primeapple for forcing page-breaks. HTML • Wednesday June 23, 2004 | | |
06/08/2004 | Transfer rich-text field content from one form to another The code below was used on the web to populate a rich text field on the current session document with rich text contained in another back-end template document. LotusScript • Tuesday June 8, 2004 | | |
06/04/2004 | Replace characters in timestamp for acceptable filenames The codes below will translate a timestamp so it can be used in a Windows filename. Removing characters such as spaces, colons, and dashs ( :/). A LotusScript version has also been added below. Lotus Formula • LotusScript • Friday June 4, 2004 | FORMULA VERSION 1 FORMULA VERSION 2 LOTUSSCRIPT VERSION | |
05/07/2004 | Click a formula button when the user hits the Enter key. Create a hotspot button, formula, javascript, etc... and assign it a ID value (i.e. "ContinueBtn"). Then add the code below to the onKeyPress form event to trap the keystroke. JavaScript • Lotus Formula • Lotus Notes Form • Friday May 7, 2004 | | |
05/05/2004 | Prevent specific selection combintaions in listboxes on the web The code below inserted into the onChange event will prevent users from selecting unacceptable combinations. JavaScript • Wednesday May 5, 2004 | | |
03/26/2004 | Go back one page in browser Use this simple code to force the browser to the previous page in history. Substitute -1 with -2, -3, etc as desired. JavaScript • Lotus Formula • Friday March 26, 2004 | JavaScript Lotus Formula | |
03/25/2004 | Remove boxes from web search results Insert the code portions below in JSHeader and onLoad events of a $$SearchTemplateDefault form in your Lotus Notes database. JavaScript • Lotus Notes View • Thursday March 25, 2004 | INSERT IN JSHEADER INSERT IN onLoad of the $$SeachTemplateDefault form after your $$ViewBody field. | |
03/19/2004 | IBM Code Page 850 Character Set Chart Contains the complete listing of IBM Code Page 850 characters typically used with @Char function in Notes. Lotus Formula • Friday March 19, 2004 | | |
03/05/2004 | Format cell style as text for Excel Forces the cell style to be "Text" ideal for EmployeeID's and SSN's that contain leading zeros. HTML • Friday March 5, 2004 | CELL FORMATING One of the most problematic areas that you will face when creating Excel files from ODS is with cell formatting. The problems are the same whether using the CSV or the HTML destinations. The problem occurs because Excel uses a General format to import cell values. The General format reads the cell values as they are typed, however, there are some common problems that you should be aware of. Both numeric and character variables will lose leading and trailing zeroes when creating Excel files with the ODS HTML and CSV destinations. You will not realize the problem until the leading or trailing zeroes are omitted from an account number, an ID, or a zip code. NUMBER FORMATS Importing the cells as text using the Text format for the cell values allow the cell values to come over without any interpretation and does not strip the leading or trailing zeroes. Using the mso-number-format:\@ style property allows the cell values to be imported using the Text format for Excel 2000 and above. For Excel 97, the style property is vnd.ms-excel.numberformat:@ . Below are examples of applying the Text format and the more common number formats. | |
03/03/2004 | Prevent auto-submit when user presses Enter By default, a Notes form will auto-submit on the web if there is only one editable/visible field. To disable this function, create another editable field and insert the code below into the properties window. HTML • Wednesday March 3, 2004 | | |
02/12/2004 | Prevent a page from being cache'd by the users browser The meta tags below will force the browser to not cache the page and always reload from server. This is very helpful for pages with embedded views when the content is changing during the users session. HTML • Thursday February 12, 2004 | | |
02/11/2004 | Geting field values (Radio buttons/Checkboxes/Comboboxes) There are different ways to retrieve values from each of these field types. JavaScript • Wednesday February 11, 2004 | RADIO BUTTONS CHECKBOXES - (single and double) Single is not an array COMBOBOXES (selectedIndex method - by ID) BEST! COMBOBOXES (selectedIndex method - by form) COMBOBOXES (loop method) | |
02/06/2004 | Open popup windows in the center of the screen. This code will automatically open a popup window in the center of the user's screen, regarless of the resolution. JavaScript • Friday February 6, 2004 | | |
02/06/2004 | Close the current popup window when it loses focus. This will force the page to close itself if the user click on any other open window. HTML • Friday February 6, 2004 | | |
02/06/2004 | Close a window when the ESC key is pressed Insert this code on your form to force the window/page to close when the ESC key is pressed. HTML • JavaScript • Friday February 6, 2004 | | |
01/28/2004 | Identifying replication/save conflicts in a database. Create a new view and insert the code below as the view selection. Lotus Formula • Wednesday January 28, 2004 | | |
01/28/2004 | Track if a user has populated the current field Insert the code into the onBlur event of a field to prompt the user to populate the field if it is blank and they attempt to exit the field with the mouse or tab button JavaScript • Wednesday January 28, 2004 | | |
12/14/2003 | Informative error handler This is an informative error handler that is ideal for both Notes clients and Web clients. Provides line#, error# and error description. LotusScript • Sunday December 14, 2003 | | |
11/25/2003 | Control web scrollbar aesthetics Use the HTML below to covert all scrollbars to a specific color and fill as shown in the example provided below. CSS • HTML • Tuesday November 25, 2003 | | |
10/14/2003 | Get current day, month, year from users browser Get current day month year from users browser HTML • JavaScript • Tuesday October 14, 2003 | | |
09/25/2003 | Hide elements from printing or from screen Insert the HTML Style code below at the top of the page and then insert either dontprint or printonly in the class property of the design element. CSS • HTML • Thursday September 25, 2003 | SAMPLE USAGE | |
09/11/2003 | "Object Variable Not Set" when accessing CurrentDocument in R6 R6 has trouble getting a handle on the currentdocument from the NotesUIWorkspace. The example below was is a dialog box that was called from an agent. The solution was to use the source handle on the notesuidocument rather than retrieve it from the uiworkspace LotusScript • Thursday September 11, 2003 | ORIGINAL CODE FIX CODE | |
09/10/2003 | Set field focus when web page loads Ideal code to add the the for OnLoad event JavaScript • Wednesday September 10, 2003 | | |
09/04/2003 | Populate a editable field with the correct number of days in a month Set the KeyField below to the field containing the target month. Lotus Formula • Thursday September 4, 2003 | | |
09/02/2003 | Format excel number cells to display in red w/ parenthesis for negative values. Display negative excel exported values in parenthesis and in red HTML • Tuesday September 2, 2003 | | |
09/02/2003 | HTML extensions for Microsoft Excel Use these tags when exporting to excel via the web. The full Microsoft Word documentation with screen-shots has been attached below. HTML • Tuesday September 2, 2003 | | |
08/06/2003 | Make the page auto-remove itself from all frames. Insert the code below in the onLoad event and the page will refresh itself out until it is no longer contained in a frame. JavaScript • Wednesday August 6, 2003 | | |
08/06/2003 | Manually create checkboxes in a web view column. Use this code when you only want a subset of the documents to have checkboxes available in a web view. The view property "Allow selection of documents" will display checkboxes for all documents. You can nest the code below in an if statement that checks for different form types or other flag fields. HTML • JavaScript • Lotus Formula • Lotus Notes View • Wednesday August 6, 2003 | VIEW COLUMNS SAMPLE USAGE | |
07/25/2003 | Select file from local machine Provide the user with a file selection prompt and set the specified file path to the field "filename". Lotus Formula • Friday July 25, 2003 | | |
07/17/2003 | Custom web view column links Use the code to apply your own attributes to a document link in a view, such as target, class, style, etc... HTML • Lotus Formula • Lotus Notes View • Thursday July 17, 2003 | | |
07/15/2003 | Print a certain frame in a frameset from another frame. Place the code in frameA to print frameb JavaScript • Tuesday July 15, 2003 | | |
04/23/2003 | Select All button for checkbox embedded view Insert the code below when you want to select all documents in a embedded web view that has the "Allow Selection of Documents" option enabled. Check the boolean value from true to false for a Deselect All button. JavaScript • Lotus Notes View • Wednesday April 23, 2003 | | |
03/27/2003 | Process selected documents in web view via back-end agent. The steps below outline how to process the selected documents of a view. Normally, the selected documents option is used for deletion of documents where a simple action button with the formulas @Command(MoveToTrash) & @Command(EmptyTrash) will do the trick, but allowing the user to perform much more complex functions on the selected documents requires much more. Embedded views in Domino create a (on-the-fly) multi-valued field called $$SelectDoc, which contains all the DocumentUniqueID's of the selected documents. However, the values of this field are only transferred to a physical notes field when the document is saved by using a javascript submit button. Using @Command(FileSave) will not populate the values. HTML • Lotus Formula • Lotus Notes View • LotusScript • Thursday March 27, 2003 | Here's the actual text to copy & paste for the Process action hotspot Here's the actual code to copy & paste for the agent below in Step F | |
03/23/2003 | Submit form when users clicks the Enter key anywhere on the form Insert the code shown below in the onKeyPress event of the form. JavaScript • Lotus Notes Form • Sunday March 23, 2003 | | |
03/21/2003 | Process selected documents on the web (v1) The code below will loop thru all the selected documents in a web view (embedded or standard). (1) Verifies than documents have actually been selected and prompts the user if none have been. (2) Prompts the user with an OK/Cancel window if the wish to proceed. (3) Loops thru the collection and only processes unique documents (helpful if you have the same document shown multiple times when showing multiple values as seperate entries). (4) For each unique document, the code launches an agent in the "AFrame" frame and passes the selected documents UNID variable via the URL. (5) The code will shortly pause after each call to the agent to allow process time. (6) Finally, the code refreshes the agent frame to blank and reloads itself. JavaScript • Lotus Notes View • LotusScript • Friday March 21, 2003 | JAVASCRIPT BUTTON PROCESS AGENT CODE | |
03/20/2003 | Create OK/Cancel prompt in javascript for web browsers. Can be used in place of Yes/No prompt. JavaScript • Thursday March 20, 2003 | | |
03/19/2003 | Print on the web Use the code below to call the users Print dialog box in the broswer for the selected page JavaScript • Wednesday March 19, 2003 | | |
03/19/2003 | Insert a short pause in your code. The code below was used in a looping process to delay between each action. JavaScript • Wednesday March 19, 2003 | | |
03/17/2003 | Reload the parent window frame The code was used in a popup window to refresh the parent when then popup was unloaded. JavaScript • Monday March 17, 2003 | | |
03/14/2003 | Popup window - refresh the parent browser window and close itself. This code is used in the onLoad event of a popup window once a choice has been selected. The code automatically forces the parent window (frame) to refresh and closes itself. JavaScript • Friday March 14, 2003 | | |
03/14/2003 | Have a popup window always stay on top of all browser windows? Forces the user to satisfy the requirements of the popup window. (note: OnBlur events may only work on some browsers) HTML • JavaScript • Friday March 14, 2003 | | |
03/13/2003 | Limit the size and characters for a web field Use the values below in the HTML Attibutes event for a field to limit it's physical size and maximum number of characters. Lotus Notes Form • Thursday March 13, 2003 | | |
03/10/2003 | Remove a value from a multi-value field The code below will remove the value of the username variable from the Members field in the group document in the nab. LotusScript • Monday March 10, 2003 | | |
03/06/2003 | Trim any/all non-approved characters from a field. This code will strip out all the specified characters from a single or multi-value field, while preserving the multiple values. Just enter the code below into your field InputTranslation event. Lotus Formula • Thursday March 6, 2003 | | |
03/05/2003 | Translate filepaths for Http URL's Use of @ReplaceSubstring to make filepaths acceptable for URL paths Lotus Formula • Wednesday March 5, 2003 | Example: | |
03/03/2003 | Add/Remove groups and roles programmatically The buttons below will add the groups from one field and assign each group the corresponding role from the role field. The index of each group and role must match for proper entry. LotusScript • Monday March 3, 2003 | ADD GROUPS BUTTON REMOVE GROUPS BUTTON | |
02/26/2003 | Display the full text weekday, month, day and year in a field or column. The example below returns "Wednesday February 26, 2003" Lotus Formula • LotusScript • Wednesday February 26, 2003 | FORMULA LOTUSSCRIPT | |
02/24/2003 | Pass variables to the background web agent through the URL The code below was used to pass the child's parent document ID to the agent. The agent used the UNID to get a handle on the parent document and extract the attachment. LotusScript • Monday February 24, 2003 | Insert an "&" to use multiple variables (i.e. ?OpenAgent&var1=Beavis&var2=Butthead&var3=Ren&var4=Stimpy) EXAMPLE: CODE ON FORM, BUTTON, ETC...: Agent Code | |
02/24/2003 | Force the open/save dialog box when download files on the web. Normally, files such as PDF's and XLS will open directly in the browser without prompting the user. The agent below will force the browser to provide the open/save dialog box when downloading files from the web. LotusScript • Monday February 24, 2003 | | |
02/24/2003 | Dual Web Action - Save/Post in formula & force file download save via bkgrd agent. The example below was used in Global Data Collect. It performs four steps: (1) Sets the flag fields and download date (2) Saves/posts the document which refreshes in the browser to show the new status (3) OnSubmit checks which button was pressed and sends a URL to the browser (after the refresh) to download the file. (4) The background agent extracts the UNID from the URL string, gets a handle on the parent document, sends a print statement to the browser to force the open/save dialog box (otherwise PDFs would open in browser automatically), and finally sends the file URL to the browser to kick off the download. Lotus Formula • Lotus Notes Form • Monday February 24, 2003 | JS HEADER ONSUBMIT DOWNLOAD BUTTON DOWNLOAD AGENT | |
02/24/2003 | Track which formula button was click on the web. The example below uses a global variable to track which web button the user clicked. In the example below, the agent referenced is only launched when the user clicks the "Download" button. This is required since both buttons perform a @Command(FileSave) command. The major point of this is that you can save and refresh the document by using formula and still have a background agent product output which is normally not possible. FYI - The url passes a variable to the agent from this form for the parent document. This code was used in the Global Data Collect database. Lotus Formula • Monday February 24, 2003 | JS Header OnSubmit | |
02/20/2003 | Force the browser to display the open/save dialog box when user is downloading a file. This code is useful for PDF's, Word doc's, etc... when the browser automatically opens the document. Inserting the two lines of code below will force the browser to prompt the user with the Open/Save/Cancel dialog box. LotusScript • Thursday February 20, 2003 | | |
02/11/2003 | Display the weekday, month, day and year on your web page Use the code below to custom format a the weekday, full text month, day and year. HTML • JavaScript • Tuesday February 11, 2003 | | |
02/04/2003 | Open a view that the user selects in a window prompt Use the LotusScript or Formula to open the desired view selected by the user. The database has a graphic navigator in a dual frameset, where the data resides in the "RightPane" named frame. Lotus Formula • Lotus Notes View • LotusScript • Tuesday February 4, 2003 | LOTUSSCRIPT VERSION FORMULA VERSION | |
01/30/2003 | Auto launch Print window The code below will display the user's Print window when the page loads. JavaScript • Thursday January 30, 2003 | | |
01/23/2003 | Sort and unique any dynamic array The code example below resorts and filters out duplicate entries in any dynamic array. The array you pass to it must be dynamic, not fixed. LotusScript • Thursday January 23, 2003 | | |
01/16/2003 | Force the target frame for all links on a page. The code was inserted on the top of a Lotus Notes form which forces all links on the page to open in a new browser window. You can replace the value with _top, _self, _parent, etc... HTML • Thursday January 16, 2003 | | |
01/15/2003 | FIX: PicklistStrings category selection doesn't work Categorized PickListStrings lookups will fail if you enable the "Collapse all when database if first opened" option in the view. There is no logical reason for this, but it tested true. LotusScript • Wednesday January 15, 2003 | | |
01/15/2003 | Prevent the page from being opened within another frames page. Inserting the code below will prevent your page from opening within another framed page. It will open (_top) for occupy the full page. JavaScript • Wednesday January 15, 2003 | | |
01/14/2003 | Redirect for web forms when saved and closed Create a computed field called "$$Return" and insert the formula below. Have a button on the document for save and close and the URL specified below will be directed to once the save has completed. Lotus Formula • Tuesday January 14, 2003 | | |
11/11/2002 | Check to see if the current database in on the server or local The formula below only allows the user to compose a new document if the database is on the server. The LotusScript version of the same code will exit the sub routine if the database is not on the server. Lotus Formula • Monday November 11, 2002 | FORMULA LOTUSSCRIPT | |
10/21/2002 | Launch Windows Explorer in a specific directory. Follow the instuctions below to create a shortcut that will launch Windows Explorer in the specified directory. Windows • Monday October 21, 2002 | | |
10/14/2002 | Calculate remaining time left for an operation The code example below calculates the time it takes to copy a set interval of documents. Then based on that interval and remaining documents left to copy it estimates how much time is remaining. Currently the interval count is set to 5% of the total number of documents (250 for 5000 docs). It performs the rounding and displays the remaining time in hours and minutes. LotusScript • Monday October 14, 2002 | | |
10/04/2002 | Remove an attachment file from a document in code Use this code to loop through all the items in a document and remove the attachment(s) which matches the specified filename. LotusScript • Friday October 4, 2002 | | |
09/12/2002 | Disable the Enter key in web forms Insert the code below in the OnKeyPress event of the form to disable the ENTER key. This code will work for both IE and Netscape JavaScript • Thursday September 12, 2002 | | |
09/06/2002 | Hide document attachments from a web user Follow these steps to hide any attachments from a web user. Lotus Formula • Lotus Notes Form • Friday September 6, 2002 | | |
08/27/2002 | Writing and reading cookies Note that as of 2019, Safari will prevent 1st party cookies from expiring later than 7 days. https://alightanalytics.com/alight-insights/safari-first-party-cookies/ JavaScript • Tuesday August 27, 2002 | Pass the cookie name to reading the value Writing the cookie by passing the name, value and the number of days before it expires. Set exdays to zero for session cookies. | |
08/19/2002 | Auto-maximize the parent frame Use this code to maximize a frameset. The code below is inserted into the OnLoad event of the form. Replace the "parent" reference with "self" below to maximaize the form/page itself. JavaScript • Monday August 19, 2002 | | |
08/19/2002 | Checking for browser type Determine if Lotus Notes Client or Web Browser. Use this code to prevent the JavaScript from running in the Notes client. JavaScript • Monday August 19, 2002 | Try this in your onLoad event. It just checks for the Browser type and runs the script based on whether it's in the Client or not... | |
08/08/2002 | Hide the scrollbars Use this code to show/hide the scrollbars of the browser window. HTML • JavaScript • Thursday August 8, 2002 | | |
08/08/2002 | Window maximizer - auto Use this code to automatically maximize any window where the code is placed. Insert the following code into the section of your html document. JavaScript • Thursday August 8, 2002 | | |
08/08/2002 | Create and convert CSV files to Excel XLS files using OLE The code below was used in the Resource Brio Reporting database for IBM. This code creates CSV files on the local PC writtien to C:\Temp and dumps the content of each into their own tab in the newly created Resource.xls file. The "tabs" array contains the names of the files in the folder on the local drive. Rangebounds is used to calculate the end column and row based on the total column & row counts. All the modules of the agent have been pasted below in their own sections. LotusScript • Thursday August 8, 2002 | (Declarations) Sub Initialize Functions | |
08/08/2002 | Calculate the text column title for Excel when using OLE and LotusScript This code will return the correct column title letters when you pass the total number of desiried columns. For example the last column letters for a spreadsheet containing 44 columns would be "AR". You would append the row count to those letters to get the last cell in the spreadsheet (if so desired) LotusScript • Thursday August 8, 2002 | | |
07/26/2002 | Removing the stored form from documents Use the formulas listed below to remove the stored form from your documents. Lotus Formula • Lotus Notes Form • Friday July 26, 2002 | In designing mail-enabled applications in which users need to see a document and don't have the original form stored in their mail databases, select the form property "Store form in documents." This form property is permanently attached to all documents created with the form. To remove the stored form, remove all internal fields connected with the form by creating an agent that uses the formula: This formula removes all internal fields attached to the documents where Old form name is the name of the form used to create the documents. The last line creates a FORM field where New form name is the form that will display the documents in the future. After you run the agent, compact the database to reduce the actual file size of the database. | |
07/02/2002 | Detecting replication/save conflicts Insert the code below to determine if the specified document is a replication/save conflict LotusScript • Tuesday July 2, 2002 | | |
06/25/2002 | Play Windows sounds New to R5, the example code below displays all the sounds on the local PC and prompts the user to select one to play. You can modify the "Call" line to specifically call a desiried sound in your scripts or agents. LotusScript • Tuesday June 25, 2002 | | |
06/24/2002 | Clean For Next and For All loops This document shows you two ways to loop all the values of an array notesitem or doc field containing multiple values. LotusScript • Monday June 24, 2002 | | |
06/24/2002 | Check for a filepath on the local PC, create it if it doesn't exist In the example below, the target path is being set in a dialog box. LotusScript • Monday June 24, 2002 | | |
05/29/2002 | Retrieve values from the Windows registry Use this simple formula to access the Windows registry for any version. Pass to it the Key, SubKey and Valuename as shown below Lotus Formula • Wednesday May 29, 2002 | | |
04/12/2002 | Identify duplicate documents in a view This agent code loops each document in the specified view, compares the values of each doc to the next doc in the view. The view must be sorted by atleast the first value you are comparing. The example below looks for duplicate assignment documents for the same employee. Lotus Notes View • LotusScript • Friday April 12, 2002 | | |
04/06/2002 | Convert percentage values to clean decimal values Insert the formula into an agent, change the "Rate" field to whatever field you're targeting and run on selected documents. This will modify documents with values above 1.0 and leave alone values already in the desiried format. The example below show the data conversion. Example: (38.8 to 0.388) Lotus Formula • Saturday April 6, 2002 | | |
04/05/2002 | Return a list prompt containing all the agents in the current database. This code is generic and can be modified to pull from other databases or execute the selected agent, etc... Used in a Button - AGENT LIST Selection from database LotusScript • Friday April 5, 2002 | | |
04/04/2002 | Version check for Lotus Notes (form example) The code below will prompt the user and not allow them to edit a document if they're using a version of Lotus Notes below R5. They will be able to open the document in read-mode. You can specify a more specific version by changing the number of characters that are scanned ( 9 characters are shown below - reading left to right). Examples of version output have been listed below in red. LotusScript • Thursday April 4, 2002 | | |
04/04/2002 | Month/year selection prompt to return a clean date value Prompt's the user for a month/year within the last 12 months, Returns a date value equal to the first day of the selected Month/Year. Used in the "Save and Close" button in the "SBD Report" form of the iTeam Marketing Database. LotusScript • Thursday April 4, 2002 | | |
04/03/2002 | Extract text from a rich text field The formula and LotusScript below can be used to extract text from a RichText field. Lotus Formula • Lotus Notes Form • LotusScript • Wednesday April 3, 2002 | FORMULA: (Insert the code into a computed text field on the form with the rich text field. Note: Rich Text fields only contain data once the doc is saved.) LOTUSSCRIPT: (Populates the text into a specified text field on the same document. It will overlook any attachments or images placed in the RichText field without producing an error.) | |
04/01/2002 | Admin field population tool (String Only) This code will allow you to populate any field you specify with any value you specify. Create a new agent and insert this code with the agent properties set to Selected Documents. Custom Tools • Lotus Notes View • LotusScript • Monday April 1, 2002 | | |
04/01/2002 | Refresh all the fields for the selected documents. Use this formula in an agent with selected Lotus Formula • Monday April 1, 2002 | | |
03/27/2002 | Determine the current user's access to a database Use this code to find out what the current user's access is to the current database. You could use this with any database, just set the "db" to any database LotusScript • Wednesday March 27, 2002 | | |
03/25/2002 | Convert a date/time to a numerical value Used for date/time comparisons, use portions of the code below to covert your date/time values. LotusScript • Monday March 25, 2002 | | |
03/25/2002 | Checking if a document is a Replication or Save Conflict Evaluate returns an Boolean array value in the example below based on the presence of the $Conflict field. LotusScript • Monday March 25, 2002 | | |
03/21/2002 | Create a collection from another database using a search formula. The code below will return all the docs in the specified database whose EmployeeUniqueID field matches the value specified. You can nest this code in a For Next loop and replace the EmployeeUniqueID with an array. You will need to populate Server and Path in the example below. LotusScript • Thursday March 21, 2002 | | |
03/20/2002 | Formatting for date & time that remains consistent despite users environment The example below returns the current users day & time in the following format = 03/27/2002 05:36:00 PM LotusScript • Wednesday March 20, 2002 | | |
03/20/2002 | Create log document Create Log Document function code LotusScript • Wednesday March 20, 2002 | | |
03/20/2002 | Sort a multi-dimensional array in ascending order This code will sort the values of an array in alphabetical or numerical order. The test example below creates a text array of letters in random order and calls the SortArray Sub function to sort the values in ascending order LotusScript • Wednesday March 20, 2002 | | |
03/20/2002 | Sort an array in ascending order This code will sort the values of an array in alphabetical or numerical order. The test example below creates a text array of letters in random order and calls the SortArray Sub function to sort the values. LotusScript • Wednesday March 20, 2002 | | |
03/20/2002 | Sort a multi-dimensional array in descending order This code will sort the values of an array in alphabetical or numerical order. The test example below creates a text array of letters in random order and calls the SortArray Sub function to sort the values in descending order LotusScript • Wednesday March 20, 2002 | | |
03/19/2002 | Open navigators based on membership of a role The code below opens navigator "Two" if the user is a member of the specified role, otherwise navigator "One" is opened. LotusScript • Tuesday March 19, 2002 | | |
03/13/2002 | Dynamic array (as string) Use this code to dynamically build an array. It will redim the array and add one more index for input for each new entry. LotusScript • Wednesday March 13, 2002 | | |
03/13/2002 | GetDocumentByKey using an array of key values The code below will allow you to get a handle on a document using multiple keys. The view must have the first value in the first column and the second value in the second column, etc... LotusScript • Wednesday March 13, 2002 | | |
03/12/2002 | Notification sub function Use this sub function to create and send emails based off the current uidocument. It automatically references the source database server and path. LotusScript • Tuesday March 12, 2002 | | |
03/12/2002 | Create data list document for each value of a field in the selected document in a view. The script below is used in a view action button for the selected document. It will make a new data list document and populate the Form & dl_category fields with static values. The dl_entry field will get populated with each value from the ListValues field found on the source document. Lotus Notes View • LotusScript • Tuesday March 12, 2002 | | |
03/11/2002 | Fix for error when using NotesUIWorkspace Compose Document method and form formulas If the ComposeDocument method is used in a view action, the form formula of the view will override the form specified in the method. To avoid this problem add the following line to the form formula. Lotus Formula • Lotus Notes Form • LotusScript • Monday March 11, 2002 | | |
03/08/2002 | Remove all seleted docs from Inbox folder Remove all seleted docs from Inbox folder and stamp flag field LotusScript • Friday March 8, 2002 | | |
03/08/2002 | Create a doc for each value in a specific field from every document selected in the view. This code will create a new DLE form for each value in the specified field, for every document that is selected in the view. Lotus Notes View • LotusScript • Friday March 8, 2002 | | |
03/08/2002 | Create a new document for each value in a field The script below is used in a form action button for the current document. It will make a new DLE document and populate the Form & dl_category fields with static values. The dl_entry field will get populated with each value from the ListValues field found on the source document. LotusScript • Friday March 8, 2002 | | |
02/27/2002 | Determine if the user clicked ok or cancel when using PickListStrings If the user clicks Cancel, picklist returns nothing, if the user clicks OK picklist is populated with a string array value. You cannot use If picklist is Nothing in this situation because it will return an error when the user clicks OK. The solution is to use the Datatype function to determine what datatype picklist is. Clicking Cancel causes the datatype to = 0 . Any other value will be covered by the Else shown below. LotusScript • Wednesday February 27, 2002 | | |
02/26/2002 | Display the date and day-of-the-week in a view column Returns a text string with the date specified and day of the week. ( 02/26/2002 03:45:00PM ~ Tuesday ) Lotus Formula • Lotus Notes Form • Lotus Notes View • Tuesday February 26, 2002 | | |
02/26/2002 | Only allow compose if no docs exist in view Use this code if you want to prevent a user from adding more than one document to a view. (1) The code looks to the specified view for an existing document. (2) If document is found, then prompt user to edit that document instead. (3) If no document is found, compose a new document using the specified form. LotusScript • Tuesday February 26, 2002 | | |
02/26/2002 | Delete a view Simple little script to delete a view from the current database Lotus Notes View • LotusScript • Tuesday February 26, 2002 | | |
02/22/2002 | Write contents of a string array to a text file Write contents of a String Array to a text file on the local PC. You need to specify the text file and the string array LotusScript • Friday February 22, 2002 | | |
02/19/2002 | Copy documents from one db to another while retaining doc/resp relationships Use this code to copy documents from one database to another while maintaining their document/response relationships. The DOCID's on the parents & $REF's on the children documents will not be changed. Note: The database portion of the ID will change, but not the actual document portion. The code below was used inserted in an agent. LotusScript • Tuesday February 19, 2002 | | |
02/15/2002 | Detecting local replicas of a database Use this code to detect if the current user has a local replica of the database. You can write this information to log documents or just prompt. You will need to replace the replica ID below with the ID from your database. LotusScript • Friday February 15, 2002 | | |
02/13/2002 | GetServerAndPath Function returns the server and path of the existing database. The path value is minus the filename itself which allows you to append other filenames to open other databases in the same directory. LotusScript • Wednesday February 13, 2002 | | |
02/11/2002 | Get a handle on the current user's profile document in a specific view. This code collects the username from the current session and looks to the view you have created to get that user's profile document. LotusScript • Monday February 11, 2002 | | |
02/05/2002 | Create and update user profile docs automatically for a database. This code is used in the database Postopen event to lookup modify and/or create a user profile for any/all users who enter the database. (1) Gathers the current users common name. (2) Looks to see if an profile document exists for this person. (3) If no, then a new doc will be created with all required info. (4) If yes, then proceed with updating of this document with sesion information. (5) Adds 1 to the total number of sessions for this user. (6) Updates the last session date. (7) Extracts the values from the SessionHistory field and repopulates it again adding in this current session while maintaining only 10 values. (8) Saves the profile doc. LotusScript • Tuesday February 5, 2002 | | |
02/05/2002 | Document review "Sign-Off" button - allows users to sign-off on a document by pressing a button. - When the user signs-off on the docuement, their name is removed from one field and transferred to another with a timestamp. - Automatic emails are being generate to all users listed in the first field, thus once removed, the user will no longer receive emails. LotusScript • Tuesday February 5, 2002 | | |
12/20/2001 | Extract a clean date value from multiple date field types. The code below will take any date field format and convert it to a clean date only string. For example, the following dates will result in "01/01/2001" 01/01/2001 or 01/01/2001 7:00PM or January 1, 2001 or 2001/1/1 . You will need to dim and set the Doc1. LotusScript • Thursday December 20, 2001 | | |
12/05/2001 | @Left & @Right equivalents in LotusScript The LotusScript "Left" and "Right" functions can only use the numerical place-holder and not search for specific string value. The code below will allow you to mimic the functionality of the @Left and @Right commands in formula. LotusScript • Wednesday December 5, 2001 | @Left @Right | |
10/14/2001 | Last day of the month Returns the last day of the month Lotus Formula • Sunday October 14, 2001 | ACTUAL STATIC | |
10/12/2001 | Sets the fields of the selected documents and refresh the view For use in a view action. -- Loops through all the selected documents in the view and sets the fields accordingly saves and refreshes the view. Lotus Notes View • LotusScript • Friday October 12, 2001 | | |
10/12/2001 | Make sure user has only selected one doc, then create response doc. For use in a view action. Prompts the user if no doc or more than one doc is selected. Also checks to see if the selected doc's form field is "Host". If all checks pass then the specified response document is created in edit mode. LotusScript • Friday October 12, 2001 | | |
10/05/2001 | Call another agent to run through LotusScript Allows you to call a specific agent via LotusScript. The example below was inserted in the "Initialize" event of a view to refresh the docs. LotusScript • Friday October 5, 2001 | | |
09/25/2001 | Hide action buttons based on user's role The formula below will hide the action button if the current user is not a member of the Administrator role. Lotus Formula • Lotus Notes Form • Tuesday September 25, 2001 | | |
08/24/2001 | Redirector to another URL using meta tags This HTML will wait 0 seconds upon entry and goto the specified URL. The entry below is used on a Domino web page, but any URL can be inserted. HTML • Friday August 24, 2001 | | |
07/03/2001 | Checks if field value has been changed on entering/exiting form This script will, upon entering, place the field value in a variable, then upon exiting place the current value in another variable. If the two values are the same no action is taken, if they are different, take action. Lotus Notes Form • LotusScript • Tuesday July 3, 2001 | (Declarations) | |
06/18/2001 | R5 DialogBox bug There's a bug with R5 which causes files to close when the DialogBox function is used. For example: A text file has been opened and is being used for data retrieval. When the BEFORE script below is evaluated, the user is prompted with the Dialogbox and then clicks OK or CANCEL. Regardless of the user's selection, the text file will be closed and the preceeding process will cause a "File Not Open" error. A solution around this is to use the new PROMPT function in R5 to replace Dialogbox. However, this new PROMPT script will not work in previous versions. So the solution is to check the version of Notes currently being used, use DIALOGBOX if R4 and PROMPT if R5 or higher. LotusScript • Monday June 18, 2001 | BEFORE AFTER | |
06/06/2001 | Forward attachments - doc version (1)Extracts all attachments from the current uidoc. (2)Create a new doc using the "Memo" form and insert those attachments. LotusScript • Wednesday June 6, 2001 | | |
06/06/2001 | Forward attachments - view version (1) Collects all the selected docs in the view. (2) Prompts user if no docs are selected. (3) Creates a new doc using the "Memo" form (4) Searches through every doc in the collection and copies the attachments to the memo doc. (5) Opens the new memo doc as a uidoc. Lotus Notes View • LotusScript • Wednesday June 6, 2001 | | |
05/15/2001 | Prevent doc from being saved. The script below will prevent the doc from being saved on close and will not prompt the user with a save dialog box. LotusScript • Tuesday May 15, 2001 | | |
05/15/2001 | Automatically modify phone number fields to U.S. Format The formulas below trrim the values of a phone number to the U.S. Format and result in the following format xxx.xxx.xxxx Input validation will only occur if the value of the field is less than 12 and not 0. Lotus Formula • Tuesday May 15, 2001 | INPUT TRANSLATION INPUT VALIDATION | |
05/13/2001 | Input validation for rich text fields Insert the script into the Querysave event for the form. LotusScript • Sunday May 13, 2001 | | |
05/11/2001 | Prevent doc deletion based on author or role membership Insert the script below in the DB 'Querydocumentdelete' event. This will prevent any user who isn't the doc author or a member of the Admin role the ability to delete the document. There are three variable types (docauthor field, role name, formname#). You will need to identify every form title. This script will also disallow users from deleting a doc if is has existing children docs. LotusScript • Friday May 11, 2001 | | |
05/11/2001 | Prevent doc editing based on field value or [Admin] role membership Insert the script for the two events listed below. This will only allow users who name appears in the "created_by" field or are a member of the Admin role to edit the document. LotusScript • Friday May 11, 2001 | | |
04/26/2001 | Prevent doc editing based on field value Two steps to prevent users from editing a doc if a field contains a specific value. (Queryopen & Querymodechange) LotusScript • Thursday April 26, 2001 | | |
04/09/2001 | Auto-check date 'year' value for correct range. Insert the formula below into the Input Validation for a Date/Time field. Returns a failure prompt if the year entered has a difference of more that 200 years. Lotus Formula • Monday April 9, 2001 | | |
03/07/2001 | Messagebox based on field value Will prompt the user if the current doc's field "Field1" value equals "value" LotusScript • Wednesday March 7, 2001 | | |
02/28/2001 | Find the free space on a drive There is no built in function to find the amount of free, used, or total bytes on a drive using LotusScript. Listed below is a LotusScript that makes the necessary API call inserted into a button. LotusScript • Wednesday February 28, 2001 | | |
02/28/2001 | Display date in YY/MM/DD format Use this to display the date in a YY/MM/DD format. Lotus Formula • Wednesday February 28, 2001 | | |
02/28/2001 | Using roles to hide objects The object will be hidden if the current user is not in the Admin role. Lotus Formula • Wednesday February 28, 2001 | | |
02/26/2001 | Search all docs in view, output to text file This script will search a specific view and check all documents to see if a specific form type exists for each staff serial number. Output is sent to a text file on the root of the hard drive Lotus Notes View • LotusScript • Monday February 26, 2001 | | |
02/26/2001 | Writing to a text file Output is sent to a text file in the format you specify: Value1, 2, 3, etc... are the fields (string values only) you wish to write to the file. LotusScript • Monday February 26, 2001 | | |
02/24/2001 | Refresh fields if doc is in edit mode Refresh fields if doc is in edit mode Lotus Formula • Saturday February 24, 2001 | | |
02/22/2001 | Count the number of documents in a view Counts documents in the view "viewname" in the sample.nsf database. Lotus Notes View • LotusScript • Thursday February 22, 2001 | OR | |
02/22/2001 | Copy a rich text field's contents to the clipboard Copy a field's contents to the clipboard. Doc will be placed in edit mode for script to execute correctly. LotusScript • Thursday February 22, 2001 | | |
02/22/2001 | Make sure doc is in edit mode before continuing Checks to see if the current doc is in edit mode. If doc is in read mode, formula switches the doc to edit mode. Lotus Formula • Lotus Notes Form • Thursday February 22, 2001 | | |
02/22/2001 | Create a second inheritied document This script allows you to save a newly created document and create another response type document that will inherit the data. LotusScript • Thursday February 22, 2001 | | |