Tips about programming, tips about software and web development in general and links to cool/useful tech sites
2010-06-28
The drive could not be mapped because no network was found
When trying to map a network drive, you may receive this error: “The drive could not be mapped because no network was found”
Causes and solutions:
1. The workstation service is missing from the computer's list of services. Install the Workstation service by enabling the Client for MS network.
2. The Workstation service is stopped. Restart it and make sure the Status setup as automatic.
2010-06-08
Notes: Database is much bigger than expected
- go to the Replication Options of that database
- select the Space Savers Tab and on the first option * ("Remove documents not modified in the last [x] days" replace the number displayed (usually 90) by 0. * WARNING: do NOT select the checkbox before this option!!!
- enter the database, exit and go back to the Replication Options and set that option back to the number of days it had before
- compact the database.
2010-05-04
Notes: Border appearing around image, even though hotspot's border is disabled
2010-04-12
View Error: Entry Not Found in Index
A view used for lookup suddenly starts to throw the error "Entry not found in index", even though there are documents that match the lookup key and no change was made to the view's design.
Problem:
The view has the option "ODBC Access: generate unique key" active and there are Replication Conflict documents displayed on the view.
Solution:
Add this formula to the view's selection formula, to exclude the Replication Conflicts and the error will stop: !@IsAvailable($Conflict)
2010-02-23
Notes: A Shared Action code was changed but it behaves as it wasn't
The Shared Action's Lotus Script code is changed on the template and, after the refresh design, the working database's action button behaves as before the change.
Solution:
Place the Lotus Script code on an agent and call it from the Shared Action using formula (@comamnd([ToolsRunMacro];"agent_name").
This way the refresh design will always update the code correctly.
2008-01-14
Notes: SelectAll in an embedded view does not work
When using the formula in an embedded view, no document is selected.
Solution:
Use a button with these formulas:
@Command([OpenView];"view_name");
@Command([ViewCollapseAll]);
@Command([ViewExpand]);
@Command([EditSelectAll]);
@Command([FileCloseWindow]);
@Command([ToolsRunMacro];"(dummy_agent_name)")
2008-01-10
Notes: Document has not yet been saved error.
Scenario:
Embedded view on a form (or page) has an action button that invokes a LS agent to work on selected documents. This works fine in a regular view.
Problem:
This action button returns the error: "Document has not yet been saved".
Solution:
In embedded views, the LS needs to be in the action button.
2007-11-08
Notes: When a space is not a space
A field that receives numbers (either is a number field or is a text field that receives input from a number field on a dialog box), contains spaces (ex: 1 000 or 27 000) that can't be removed with a @ReplaceSubstring(field_name; " "; "").
Cause:
The number field has the "Punctuated at thousand" option set, which, in some user settings, causes the insertion of a space within the number. But this space is not the common ASCII character 32, but a special one: the ASCII character 160.
Solution:
Use this code:
sSpace1:=@char(32);
sSpace2:=@char(160);
sNumber:=@ReplaceSubstring(field_name; sSpace1; "");
sNumber:=@ReplaceSubstring(sNumber; sSpace2; "");
2007-10-25
Notes: Insert a DocLink into a Rich Text Field while editing the document (without the need of saving it)
So, an alternative is to have a page with an embedded view showing the documents list from where the user will choose the document to link to, and then call this page on a dialog box.
On the page's QueryClose event, add this:
@Command([EditMakeDocLink])
And on the form where the RichTextField is, add a button or an Action with a formula similar to this:
@DialogBox( "pg_name" ; [AutoHorzFit] : [AutoVertFit] : [NoNewFields] :
[NoFieldUpdate] : [SizeToTable] : [ReadOnly] ; "Insert Doc Link" );
@Do
( @PostedCommand([EditGotoField];"rtf_field_name");
@PostedCommand([EditInsertText]; @NewLine);
@PostedCommand([EditInsertText]; "Document link: ");
@PostedCommand([EditInsertText]; @NewLine);
@PostedCommand([EditInsertText]; @NewLine);
@PostedCommand([EditLeft];"2"); @PostedCommand([EditPaste]))
Notes: View Entry's ColumnValues returns an array for a specific column
In this case the ColumnValues property of the NotesViewEntry class, will return an Array and the common way of obtaining it's value will fail.
To access the entry's column value weather it's an array or not, use this:
And then use it like this:Function getColValue (vCol As Variant) As String
If Isarray(vCol) Then
getColValue = Cstr(vCol(0))
Else
getColValue = Cstr(vCol)
End If
End Function
stringValue = getColValue(vwEntry.ColumnValues(1))
2007-10-03
Notes: Scheduled agents on server
http://your_server/your_db_path/your_db/your_agent?openAgent
Now just go to the server's log to check for debug and/or error messages.
2006-05-11
Notes: After logout, authentication is no longer possible
User presses the login button/link, inserts username and password and gets authenticated. Later he presses the logout button/link, and he is successfully logged out. If he tries to login again, he's unable to because the authentication form is never presented again (unless he closes the browser window and re-opens it).
Possible Solution:
In case the login link is like this:
top.location.href = "/database_path?OpenDatabase&Login">
change it to:
top.location.href = "/database_path?Login&redirectTo=database_path?OpenDatabase">
2006-05-09
Notes: View doesn't refresh
- permanently shows the Refresh Icon
- the "NoCache" parameter on the dblookup "doesn't work"
- the view.Refresh statement doesn't refresh the view
Problem:
Use this formula instead: @TextToTime("Today") - it calculates only to the year-month-day so that the index only updates once a day.
2006-04-28
Notes client: action bar properties are not rendered in the client
Windows: Usb Hub is not recognized ("Unknown device")
2006-04-05
Notes - Lotus Script: Resume without error
A script ends and returns the "Resume without error" message, even though no error was thrown during it's execution.
Checking the Error$ function, it may return the message "Variant does not contain a container".
Possible solution:
Include in the script the "Option Declare" statement, correct all errors (undeclared variables) and save it.
2006-01-12
Notes - LotusScript: function returning a notes document
You can either pass the database *and* the document and pass them both back, or you can declare the database globally .
2005-12-27
Windows - ActiveX: ActiveX is enabled on IE but does not work
- unable to access MMC console (access rights message error, although having administrator rights) and/or unable to save a new one ("MMC cannot save the console");
- windows update not working or crashing the IE browser;
- msn messenger unable to connect.
Solution:
Go to Start -> Run and write: regsvr32 MSXML3.dll and click OK.

