Genii Weblog


Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.


Sat 25 Jul 2020, 06:02 PM
Lions and tigers and admin tips! Those who know me know that I hate system admin. Moreover, I am spectacularly bad at it. And yet.
 
Here is an admin tip which might help somebody, or might not. I was following the instructions in Generating a keyring file for Domino (KB article #KB0073309), and ran into a problem with the kyrtool hanging in step 5) Create a new keyring file.
 
Mind you, I don't know what a keyring file is or why you want it, but I've followed recipes before, so I know how to do what I am told. Problem is, what I am told has an assumption built in. There is a note: At this point in the example, the Administrator switched from the Linux box where OpenSSL was run to a Windows box to use kyrtool.exe. There is no explanation why the Administrator didn't just start on the Windows box rather than do half the steps there and switch. I assume Administrators (who must be capitalized) have little enough to do that they have to keep themselves amused by switching between systems.
 
Anyway, the instruction they gave was:  kyrtool =c:\lotus\notes\notes.ini create -k c:\lotus\notes\data\keyring.kyr -p password
 
 
Inline JPEG image
Seems simple enough, though I had to check with my PLN (Personal Learning Network, aka Gab, Andrew, Jesse, etc.) to find out whether that password was supposed to match my personal id or the server id or be made up. Tip: Just make one up.

So, I modified that line slightly to match my own Notes directory and my (made up) password, but it hung, as if waiting for input. Back to the PLN, but nobody had an answer until it occurred to me that I was using the kyrtool.exe that came with Domino, so my path pointed at the Domino directory. Back in the instructions, the earlier steps were related to the Domino server (always 64-bit in 11.0.1), but the switch to Windows meant that the Administrator had downloaded the 32-bit kyrtool to the Notes client directory (always 32-bit in 11.0.1). So, my guess is that I was calling a 64-bit kyrtool.exe which was trying to use the DLLs and such from the 32-bit client and getting hung up. Jesse suggested I just remove that 
=c:\lotus\notes\notes.ini part and see what happened.
 
And guess what, it worked! No hang, and I got to go on to step #6. Lucky me.
 
tl;dr - Make sure your kyrtool.exe matches the bitness of your Notes/Domino DLLs. Otherwise, it will sit and wait forever, and waiting forever is something only admins should do, never developers.

Copyright © 2020 Genii Software Ltd.

Tags:

Sat 18 Jul 2020, 04:33 PM
I've made quite a few videos on my Youtube channel. The most popular ones are all related to Gimp, but among the demos of our Genii Software products, one of the enduring favorites is below. It hit 1000 views today, which may not sound like much, but plenty of product demos have fewer than 100 views and still bring in business. It seems funny to me, because it isn't even a great title since many of the people using this sample db are actually moving to SharePoint or Zendesk or Atlassian Confluence or other places, but people seem to understand that taking data out works no matter where you are taking it.
 
Inline JPEG image
 
So, apropos of nothing, I thought I'd share this again. I've had two Midas LSX evaluation requests in the past 10 days based on people wanting to use this Export to CSV (and HTML) migration capability, and have at least 5-6 customers already in projects using it right now. No, they aren't all migrating away from Notes. Some are simply doing periodic synchronization or other such extracts. But they all use the code, and pretty much all rave about it. Others use our parallel capabilities to export to XML or JSON. I don't know how many discovered the Midas LSX and Midas Exports through this video, but I know some have. So, play it again, Sam.
 
 

Copyright © 2020 Genii Software Ltd.

Tags:

Thu 9 Jul 2020, 11:33 AM
This is a follow up to my post, From REST to Notes db in two seconds. In that, we use the results of a call to a public REST API to created a form, fields, view, and documents. Cool, but often you just want to create an instant little mini-report in a rich text field. Let's start at the end this time. There is a nifty REST API to retrieve foreign exchange rates. You call it at https://open.exchangerate-api.com/v6/latest. An example is today's results, which are 
 
{"result":"success","documentation":"https://www.exchangerate-api.com/docs/free","terms_of_use":"https://www.exchangerate-api.com/terms","time_last_update_unix":1594253195,"time_last_update_utc":"Thu, 09 Jul 2020 00:06:35 +0000","time_next_update_unix":1594340705,"time_next_update_utc":"Fri, 10 Jul 2020 00:25:05 +0000","time_eol_unix":0,"base_code":"USD","rates":{"USD":1,"AED":3.67,"ARS":70.88,"AUD":1.44,"BGN":1.73,"BRL":5.36,"BSD":1,"CAD":1.36,"CHF":0.94,"CLP":791.55,"CNY":7.01,"COP":3608.55,"CZK":23.69,"DKK":6.6,"DOP":58.2,"EGP":15.98,"EUR":0.885,"FJD":2.16,"GBP":0.796,"GTQ":7.7,"HKD":7.75,"HRK":6.68,"HUF":314.67,"IDR":14199.6,"ILS":3.45,"INR":74.99,"ISK":139.34,"JPY":107.48,"KRW":1196.48,"KZT":409.22,"MXN":22.72,"MYR":4.27,"NOK":9.44,"NZD":1.53,"PAB":1,"PEN":3.53,"PHP":49.53,"PKR":166.43,"PLN":3.96,"PYG":6615.67,"RON":4.29,"RUB":71.27,"SAR":3.75,"SEK":9.22,"SGD":1.39,"THB":31.23,"TRY":6.86,"TWD":29.42,"UAH":26.85,"UYU":43.29,"ZAR":17}}
 
Even if you don't deal with JSON much, you could probably pick out that the exchange rate with CAD (Canadian dollar) is 1.36. We could certainly use the new JSON classes in Notes to traverse the JSON, find the values and build a report, but our Midas LSX is all about maximizing what you can do while minimizing the effort to do it. So, my business users want a snapshot of four specific exchange rates. I decided to present them like this:
 
Inline JPEG image
But how did I get from the JSON returned to this table? As a practical matter, I first just used our AppendFieldsWithJSON method to create fields from everything. It looked like this (and goes on and on until ZAR):
 
Inline JPEG image
 
You can see that when our method hits an object inside the object (this one called rates), it presents the values like this. But I wanted the rates presented more nicely, so I switched the properties of the AppendFieldsWithJSON to start down at the rates object (by setting ChildOf='rates'), and specify it as a vertical table inside a single tabbed table with a label. That looked like this:
 
Inline JPEG image
 
This is close, but I only want my four currencies, and I think the background should be green. Oh, and I'd like the labels to reflect the commonly used names for these currencies. So, I change the properties string a bit to include a comma-delimited list of the items I want and the way I want them to appear.
 
props = "AsTable='vertical' AsObjectArray='yes' ChildOf='rates' Items='AUD=Australian Dollar,CAD=Canadian Dollar,EUR=Euro,JPY=Japanese Yen' "
 
After a bit more tweaking of the color and tab label, I get my final code:
 
Sub Initialize
   DimAs New NotesSession
   Dim db As NotesDatabase
   Dim doc As NotesDocument
   Dim http As NotesHTTPRequest
   Dim gs As New Geniisession
   Dim rtitem As New Geniirtitem
   Dim rtchunk As Geniirtchunk
   Dim props As String
   Dim col1props As String
   Dim col2props As String
   Dim json_val As String 
 
   Set db = s.CurrentDatabase
   Set doc = New NotesDocument(db)
   doc.Form = "JournalEntry"
   doc.Subject = "Exchange rate data as of "+CStr(Now)
 
   ' *** Create the rich text item, overwriting it if it already exists
   Call rtitem.CreateBackend(doc.Handle, "Body"True)
 
   ' *** Add the title, and make everything Verdana to look better
   Call rtitem.DefineFont("Verdana")
   Set rtchunk = rtitem.DefineChunk("Everything")
   rtchunk.Font = "Plain 10pt Verdana"
   Call rtchunk.AppendTable(11"RowDisplay='Tabbed' TabFont='12pt Bold Verdana' BorderEffects='Drop_Shadow' TableWidth='Fixed' ", _
   "Text='' Width='3in' CellColor='RGB127,255,127' TabLabel='FX Rates with US Dollar'")
   Call rtchunk.ZoomIn("Table 1; Row 1; Inside column 1")
 
   ' *** Retrieve the JSON to use
   Set http = s.CreateHTTPRequest()
   http.PreferStrings = True
   json_val = CStr(http.get("https://open.exchangerate-api.com/v6/latest"))
 
   props = "AsTable='vertical' AsObjectArray='yes' ChildOf='rates' Items='AUD=Australian Dollar,CAD=Canadian Dollar,EUR=Euro,JPY=Japanese Yen' "
   col1props = "Text='' TextFont='Bold #004080'"      
   col2props = "Text='' TextFont='-Bold #004080'"      
 
    ' *** Appends the fields to the form and save
   Call rtchunk.AppendFieldsWithJSON(json_val, props, col1props, col2props)
   Call rtitem.Save()    
End Sub
 
and when I run that, I am back to the beginning. This could be the entire rich text field, or you could have an agent just drop it in where you want in an existing rich text. 
Inline JPEG image
A lot of power with a small amount of code, and it is easy enough to tweak and change and run again so you can design and create your look without spending a ton of time designing and creating your code. That's the Midas LSX advantage,

Copyright © 2020 Genii Software Ltd.