Genii Weblog


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


Sun 5 Jun 2022, 08:51 PM
Learn to code session on June 6th at 5pm EDT


Making software isn't hard. Making software easy is the really hard part. As our customers and partners know. we work very hard to make our Genii Software products easy and intuitive. But tomorrow (Monday, June 6th at 5pm EDT), I am trying a new challenge. I am holding a Learn-To-Code event in which I will be building a Drag-n-Drop Dominos game using HTML, CSS, and JavaScript. The goal is to have people code along with me, so I need to minimize "cooking show magic" where lots is already prepared for them. Getting the game working was fairly easy, but I am spending much more time simplifying the steps and trying out different approaches to make the code accessible to non-coders and low-coders. If this works out, I will likely do other such events, possibly also throwing in a Notes/Domino Learn-To-Code session here and there.
 
This event is sponsored by the coding bootcamp, Tech Elevator, where I teach people to become full stack web developers. It is a virtual event which means anybody who wants can sign up and join to watch me, though my focus is on motivating Cleveland folks to think about how much fun coding can be.
 
Fri 3 Sep 2021, 08:51 AM
I'm working on a series of posts for next week on the four most common ways to represent a table of values in Notes that do not play nicely with relational databases. There are others, but these four are ones I see routinely when exporting data with Midas Exports or retrieving data with Exciton Boost. (There are also ways that do play nicely, but why talk about them?) My challenge for myself is whether I can use both tools to export or retrieve the data from each in a way that forces them to play nicely with relational databases.
 
In order from most to least common of the four top ways I see to make table data that don't play easily with relational databases:
 
1) Hard-coded table cell fields, every one separate
2) Parallel multi-value fields, one per column
3) Response documents, one per row
4) Tables embedded in rich text
 
Watch this blog for my posts. Also, feel free to leave a comment if you know of other ways to represent table data that don't play nicely with relational databases/techniques.
 
Inline JPEG image
 
Mon 21 Jun 2021, 09:56 PM
 
Inline PNG image
 
I gave a presentation today at Rudi's DominoCamp. Kind of a weird thing presenting in silence for 75 minutes. I was relieved to see the people who started watching seemed to still be there at the end, as there was no way of know while I was presenting. I look forward to getting back to in-person conferences.
 
Slides are here --> Custom Domino Extensions in a Modern AppDev World - DominoCamp 2021 slides <-- though I will likely put them up on Slideshare later as well.
 
For the demos, I put most of the output in slides so you could see it. The source code and make file for the DspLnks64 DSAPI and Daleks ExtMgr are below, though you may need to adjust the makefiles to match the compilers you have set up, or skip it and make the projects in an IDE. (Recommended compilers kept switching between versions.)
 
dsplnks64.dll (version built and used in  demo)
 
ndaleks64.dll (version built and used in  demo)
 
The Node.js demo I desscribed with the invoices is described in full at Down to Business - PDF Invoices from Notes data in Node.
 
Thanks to everybody who attended. Anybody who has questions should feel free to ask, as I am always up for brainstorming about extensions.
 
I will provide a link to the video when it is available.
Thu 10 Jun 2021, 09:45 AM
Inline JPEG image
 
 
This is just a simple tip for those upgrading to Notes 12, as I just did. I mentioned on Facebook that I was surprisingly happy with the new workspace look, surprising only because I hated all the recent ones and have used the Textured Workspace until fairly recently. I was surprised that when I was asked for a screenshot like the one above, somebody else showed theirs and it looked quite different, like the one below.
 
Inline JPEG image
 
After being questioned about what I might have done differently, I started looking and found the answer. If you right click on the workspace, there is a Background option. This has been advertised as a way to put a custom background image, but if you are like me and simply aren't sure you want so much blue, you can just set the option to None and you get the lighter screen like me.
 
Inline JPEG image
 
 
 
 
That's it, really. Not a big deal no matter what you choose. I should say, even with the blue background it is better than the Notes 9, 10, or 11 workspaces, so whatever you choose, it feels like a step up. Thanks, HCL.
 
Wed 5 May 2021, 05:47 PM
This update on an earlier post shows some of the capability of Midas LSX Version 5.75, released this past week. The goal is an instant little mini-report in a rich text field, based on almost any public REST API. 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", "provider":"https://www.exchangerate-api.com", "documentation":"https://www.exchangerate-api.com/docs/free", "terms_of_use":"https://www.exchangerate-api.com/terms", "time_last_update_unix":1620172951, "time_last_update_utc":"Wed,  05 May 2021 00:02:31 +0000", "time_next_update_unix":1620261101, "time_next_update_utc":"Thu,  06 May 2021 00:31:41 +0000", "time_eol_unix":0, "base_code":"USD", "rates":{"USD":1, "AED":3.67, "AFN":78.37, "ALL":102.81, "AMD":520.88, "ANG":1.79, "AOA":650.5, "ARS":93.66, "AUD":1.3, "AWG":1.79, "AZN":1.7, "BAM":1.62, "BBD":2, "BDT":84.84, "BGN":1.62, "BHD":0.376, "BIF":1950.25, "BMD":1, "BND":1.33, "BOB":6.89, "BRL":5.45, "BSD":1, "BTN":73.91, "BWP":10.93, "BYN":2.57, "BZD":2,  "CAD":1.23,  "CDF":1982.38,  "CHF":0.914,  "CLP":704.64, "CNY":6.48, "COP":3790.25, "CRC":613.73, "CUC":1, "CUP":25.75, "CVE":91.35, "CZK":21.54, "DJF":177.72, "DKK":6.18, "DOP":57.03, "DZD":133.71, "EGP":15.65, "ERN":15, "ETB":42.02, "EUR":0.829, "FJD":2.03, "FKP":0.72, "FOK":6.18, "GBP":0.72, "GEL":3.43, "GGP":0.72, "GHS":5.77, "GIP":0.72, "GMD":51.87, "GNF":9886.02, "GTQ":7.72, "GYD":213.58, "HKD":7.77, "HNL":24.03, "HRK":6.24, "HTG":86.4, "HUF":300.5, "IDR":14451.3, "ILS":3.27, "IMP":0.72, "INR":73.91, "IQD":1455.73, "IRR":41896.5, "ISK":124.59, "JMD":153.18, "JOD":0.709, "JPY":109.33, "KES":107.31, "KGS":84.83, "KHR":4071.34, "KID":1.3, "KMF":407.58, "KRW":1124.57, "KWD":0.3, "KYD":0.833, "KZT":428.31, "LAK":9416.2, "LBP":1507.5, "LKR":196.79, "LRD":171.85, "LSL":14.47, "LYD":4.47, "MAD":8.92, "MDL":17.73, "MGA":3792.33, "MKD":50.8, "MMK":1558.46, "MNT":2844.74, "MOP":8, "MRU":35.96, "MUR":40.28, "MVR":15.42, "MWK":792.93, "MXN":20.24, "MYR":4.12, "MZN":57.47, "NAD":14.47, "NGN":395.55, "NIO":34.94, "NOK":8.32, "NPR":118.26, "NZD":1.4, "OMR":0.384, "PAB":1, "PEN":3.82, "PGK":3.51, "PHP":48.08, "PKR":152.86, "PLN":3.79, "PYG":6503.36, "QAR":3.64, "RON":4.1, "RSD":97.85, "RUB":75, "RWF":984.95, "SAR":3.75, "SBD":7.9, "SCR":14.99, "SDG":378.63, "SEK":8.47, "SGD":1.33, "SHP":0.72, "SLL":10205.78, "SOS":577.27, "SRD":14.12, "SSP":177.64, "STN":20.3, "SYP":1262.9, "SZL":14.47, "THB":31.2, "TJS":11.31, "TMT":3.5, "TND":2.74, "TOP":2.26, "TRY":8.31, "TTD":6.78, "TVD":1.3, "TWD":27.94, "TZS":2315.59, "UAH":27.75, "UGX":3561.65, "UYU":43.84, "UZS":10630.2, "VES":2840459.11, "VND":23031.05, "VUV":107.92, "WST":2.51, "XAF":543.44, "XCD":2.7, "XDR":0.699, "XOF":543.44, "XPF":98.86, "YER":250.25, "ZAR":14.47, "ZMW":22.33}}
 
Even if you don't deal with JSON much, you could probably pick out that the exchange rate with CAD (Canadian dollar) is 1.23. 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 could just use our AppendFieldsWithJSON method to create fields from everything. It would look like this (and goes on and on until ZAR), though this is not current data:
 
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 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' "
 
    ' *** Appends the fields to the form and save
   Call rtchunk.AppendFieldsWithJSON(json_val, props, "TextFont='Bold #004080'""TextFont='-Bold #004080'")
   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, 
 
Request a Midas LSX evaluation license today and give it a try. We'll send you a sample db showing this code with a few variations to give you ideas.
 
Thu 29 Apr 2021, 03:18 PM
Inline JPEG image
 
A follow up to Archive a Notes DB off-line in 4 easy steps, this video gives a taste of how powerful and flexible the Archive It! tool is. Along with the archived snapshot, you can save a JSON, XML, or CSV file with some or all of the fields preserved in case a future need arises. In addition, this demo shows how the Midas LSX and the Archive It! db handle more complex forms that might include collapsed sections, embedded views, and much more.
 
Request a Midas LSX evaluation license today and give it a try. We'll send you a link to the Archive It! database with your evaluation.