Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs






May, 2021
SMTWTFS
      01
02 03 04 05 06 07 08
09 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

Search the weblog





























Genii Weblog


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


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.
 

Copyright 2021 Genii Software Ltd.

Tags:

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.
 
 
 
 

Copyright 2021 Genii Software Ltd.

Tags:

Tue 20 Apr 2021, 06:11 PM
Inline PNG image
 
We have a new sample db for our Midas LSX called Archive to Disk.  The idea is that sometimes you have a database you no longer need to use actively, or that you want to give to somebody who won't be using it in Notes/Domino. With no additional coding, you can create an off-line archive that preserves the look and feel of the Notes database, right down to working doclinks, sections, and tabbed tables. Views will be reproduced to access the documents, and a custom launch page created, all in a few easy steps.
 
This uses Midas LSX 5.75, which will be available tomorrow. Midas Export pricing applies. Closed captions will be provided shortly.
 
 
 
 

Copyright 2021 Genii Software Ltd.

Tags:

Thu 18 Mar 2021, 11:55 AM
Inline JPEG image
 
There are a lot of ways to write out an exact date and time, but for the sake of international standards, dates in JSON and other interchange formats should be written using ISO 8601. But even that gives us options. The following two dates represent the exact same moment in time, but do they represent the exact same information?
 
"@created""2021-02-22T16:32:19Z"
 
"@created""2021-02-22T11:32:19.53-05:00"
 
While they are considered equivalent, are they? What is the piece of metadata that is lost in the first but not the second? It is the original time zone in which the document was created.
 
Now, this may seem unimportant. In most cases, it probably is unimportant. But if there is one thing I have learned in my years converting data from one format to another, and especially in doing roundtripping or synching of data that must coexist in two different platforms, it is that every detail is precious some of the time or to some of the people. In meeting invites, we see both when the invitation is and what time zone it was created it. If we convert to the first of these two formats and then back, we lose that information, or even if we just pull it out for display elsewhere, we won't have it.
 
Now, I want to be clear that even the second format is risky. A standard JSON parser that recognize dates may turn these both into the same timedate object. But a savvy parser in a system that has the capability to store time zones will store that time zone with the second format. It can't with the first. The detail is simply lost.
 
Addendum: Just a quick follow up to this. In reality, you can't determine the time zone itself from the time offset, but you can calculate the local time in which the time was created. Therefore, we offer an option to use an extended construct for Notes time date item values that gives the time zone as a separate value along with the time and date, e.g., "StartTime": {"zone":"EST", "value":"2021-03-01T10:30:00.00-05:00"}

Copyright 2021 Genii Software Ltd.

Tags:

Mon 15 Mar 2021, 10:12 PM
Inline PNG image
 
While Genii Software is best known for our Notes/Domino related coexistence and migration products, we work in other areas as well. But both inside and outside of Notes/Domino, our core business is really data movement. If you have data in some format or encapsulation, and you need it in some other format or encapsulation, that's what we do. Whether you need the data to move for a moment, for the duration of a project, or forever, we help you move it.
 
The challenge for me is usually not the format or system or structure the data is going to, but the format or system or structure the data is coming from. Often older, outdated systems, though certainly not always, I need to understand as much or more about the source as the destination. Which is why I spend time building new design and new data into things like Infopath Forms that are already facing EOL. Because when that data needs to go elsewhere and fit into some other design (whether Microsoft Power Apps or Salesforce Lightning Apps or whatever), we need to be able to understand the data we are likely to see, and the stuff we are less likely to see, but still will because developers will use anything. we need to be prepared for structures allowed in one system but not in another, especially multi-value anything (e.g., repeating tables), as those tend to be implemented differently in different systems.
 
So, I am creating forms that will never be used by anybody but me, all to be ready for you.

Copyright 2021 Genii Software Ltd.

Tags:

Wed 3 Mar 2021, 10:57 PM
Inline PNG image
 
 
Barely a week goes by when I don't hear the question "But can you take my Notes data and move it into <Shiny New Thing>?" Sometimes, the question goes the other way around. Either way, the answer is almost certainly yes. When it comes right down to it, one of the things we excel at is moving data around.  Chances are even good we can move from <Shiny New Thing One> to <Even Shinier New Thing Two>. (Companies do like shiny.) Moving data accurately and well is critical whether you want to move your data for a project, for a moment, or forever.
 
We might already have a tool for it. We might need to pull together some different custom tools we have. We might need to use Midas or Exciton or sheer magic. But we can most likely get your data moved, and we can most likely do it with the highest fidelity available. We are not as cheap as that freeware tool you can download from <Shady Website Du Jour>, but we also don't bring the viruses along with us. We might not have the sales team to take you out to a fancy meal before lifting your wallet and dumping it out on the table.
 
We just care about data. We are especially good with Notes data, kind of a speciality of the house, but we are quite adept with other data as well. You might need it in JSON or XML or CSV or HTML, or most likely some combination. Whatever your shiny new thing is, we can help you get your data there, and make sure it shines too when it gets there. The image below includes some of the formats we support, but there are plenty  more that are specialized variants, so don't hesitate to ask. Just know that the answer is probably yes, and that even if it isn't, we can probably turn it into a yes in short order. We're good that way. If you want to ask this question or any others, I can be reached at . I look forward to hearing about the data you need for your shiny new thing.
 
 
Data retrieval, migration, and archiving
 

Copyright 2021 Genii Software Ltd.

Tags: