OPENNTF WEBINARS
February, 2022 OpenNTF Webinar
What's new in 12.0.1 for Developers including the new
QueryResultsProcessor

AGENDA• Welcome – Howard Greenberg and Graham Acres• Presentation – John Curtis, HCL• Q and A - All

THANKS TO THE OPENNTF SPONSORS• HCL made a contribution to help our organization• Funds these webinars!
• Contests like Hackathons• Running the organization• Prominic donates all IT related services• Cloud Hosting for OpenNTF• Infrastructure management for HCL Domino and AtlassianServers• System Administration for day-to-day operation

HCL NOTES UI CONTEST• OpenNTF is co-sponsoring HCL Notes UI Contest withGroupWave• The new application should work within Notes Client
V12.0.1 and Nomad for mobile devices (both iOS andAndroid• Entries will be judged on usability, compatibility, and technicaldesign• The jury consists of HCL Ambassadors and HCL employees• Winners announced at Engage in May!
• More info at https://www.groupwave.be/contest/

THIS IS OUR COMMUNITY• Join us and get involved!
• We are all volunteers• No effort is too small• If your idea is bigger than you can do on your own, wecan connect you to a team to work on it• Test or help or modify an existing project• Write guides or documentation• Add reviews on projects / stars on Snippets

UPCOMING EVENTS• Engage 2022 – Bruges, Belgium – NOW May 23-25, 2022
• https://engage.ug/

NEXT WEBINAR – DOMINO ADMINTOOL• March 17, 2022
• Heather Hottenstein, HCL• Register at https://www.openntf/org/webinars

ASKING QUESTIONS• First Question – Will this be recorded?

• Yes, view on YouTube!!!
• https://www.youtube.com/user/OpenNTF• Use the Questions Pane in GoToWebinar• We will get to your questions at the end ofthe webinar• The speakers will respond to your questions
verbally• (not in the Questions pane)• Please keep all questions related to thetopics that our speakers are discussing!!!
• Unrelated Question => post at:• http://openntf.slack.com/

WHAT'S NEW IN 12.0.1
FOR DEVELOPERS
John Curtis

February 2022 OpenNTF Webinar
What's new in 12.0.1 for Developers
featuring QueryResultsProcessor views
John Curtis
Domino Core Application Team Lead
jdcurtis.blog
john_curtis@pnp-hcl.com
Twitter - @john_d_curtis_

Agenda• Named Documents• Named Result Sets
• DQL Improvements• QRP Views

New in v12.0.1 - Named Documents• Named Documents•••

Uses a String keys to store and retrieve documents without NoteIDs
Functional alternative to Profile documents, resolves:• Hard-wiring to threads – so updates don’t work (not even for the same user)• There is NO Name Document cache• In common with Profile Notes• API exposure, hidden documents• Can only create and find ND created through backend
Rule of thumb – use Name documents on servers, profile documents on clients• Containing in (Notes)Database, methods and properties:
Set doc = db.GetNamedDocument( <name>, <username>)
returns a new (Notes)Document like any other except it is indexed• <name> a unique string (conflicts otherwise) – your construction• <username> qualifies the unique string for a given userNamed Documents (continued)• Containing in (Notes)Database, methods and properties:
Set doc = db.GetNamedDocument( <name>, <username>)
returns a new (Notes)Document like any other except it is indexed• <name> a unique string (conflicts otherwise) – your construction• <username> qualifies the unique string for a given userSet doccol = db. GetNamedDocumentCollection(<name>)•••<name> - same name value as in GetNamedDocument – Optional
If <name> is specified, all <username>-keyed documents are retrieved that
use that <name>If NOT specified, all named documents in the database are returnedNamed Documents (continued)• (Notes)Documents methods and properties
Set nd = doc.IsNamedDoc/GetNamedDoc()• Returns True/False whether a document is named or notSet name = doc.NameOfDoc/getNameOfDoc()•Returns <name> specified in GetNamedDocument, empty string if not anamed document

Set user = doc.UserNameOfDoc/getUserNameOfDoc()• Returns <username> specified in GetNamedDocument, empty string if not a nameddocument

Set nn = doc.IsNewNoteDoc/IsNewNote()•returns True if GetNamedDocument was used and the key is new

DQL embedded Formula Language•Embedded Formula Language▪

Syntax▪
@FL or @formula (case insensitive)▪
Embedded syntax enclosed in single quotes@fl(‘@length’) > 2430
@FORMULA(‘@left(fld1;3) = "abl" or @left(fld2;2) = "ab“’)▪

Provides▪
Intra-document terms (between different fields)▪
Full expression support▪
HUGE library of existing functionality• Burning question – “Should I be using DQL?”

New in v12.01 – Named Result Sets•••

Create and save important sets of documents under a name for quick reuse
No need for views of FT indexes – can use document data only
New Java and Lotusscript (Notes)DominoQuery execute method arguments

DocumentCollection execute(String query, String resultname, boolean replace) throws NotesException
DocumentCollection execute(String query, String resultname, boolean replace, int expirehours) throws NotesException

resultname - unique name for this document set
replace – replaces the current document set saved under that unique nameexpirehours – how many hours until the document set is discarded (default 24)

Named Result Sets (continued)•To reuse the document set, use DQL in clause

Save:Set doccollection1 = dql.execute(“field = ‘value’ or .. and .. ”, “docset1”, true, 8760)
Reuse:
Set doccollection2 = dql.execute(“in (‘docset1’) and field2 = ‘value2’”)••Gain in performance – 100x to 1000x faster
Some details••••

Use cases – reporting, daily/hourly documents searched for all the time
Static document sets – do NOT refresh automaticallyDatabase limits (500 per database, 50MB in total stored size) – can be overridden
They expire – discarded automatically by updall – but settable (8760 is one year)

Named Result Sets (continued)• Named result sets and updall(load) updall <dbpath> -j <opt> manages named named document sets, see options below
deleteOne <name> deletes one named document set
deleteAlldeletes all named document sets
deleteOld deletes old, expired named named document sets
reportgenerates a report of named named document sets••

deleteOne overrides expiration datedeleteAll destroys all named document sets in a database – powerful, use carefully• More controls using backend classes:•(Notes)Database .RemoveAllQueryNamedResults

(Notes)QueryResultsProcessor (QRP)•Reading materials••••••

https://help.hcltechsw.com/dom_designer/12.0.0/basic/H_NOTESQUERYRESULTSPROCESSOR_CLASS.html
https://help.hcltechsw.com/dom_designer/12.0.0/basic/H_QUERYRESULTSPROCESSOR_CLASS_JAVA.html
https://jdcurtis.blog/2021/11/29/the-query-results-processor-part-one/
https://jdcurtis.blog/2021/11/30/the-query-results-processor-part-two/
https://jdcurtis.blog/2021/12/02/the-queryresultsprocessor-part-three/https://frostillic.us/blog/posts/2022/1/13/dql-queryresultsprocessorand-jnosql

(Notes)QueryResultsProcessor (QRP)•DQL••••As a Domino search service, finds documents from a single database
Allows traversal through result sets using DocumentCollection logic
Does NOT•
Fetch viewable/presentable data from the database•
Sort data by anything other than NoteID•
Get results from multiple databases•
Do that all on the fly, with discardable results

So .. the (Notes)QueryResultsProcessor was built•

Delivered in 2 parts in v12 and v12.0.1

(Notes)QueryResultsProcessor (QRP)•Use cases••••

Cyclical/periodic reporting (including regulatory)
Atomic data element data gathering (a case, a user, a part)
Snapshot, point-in-time recording of state (e.g. workflow as of a certain
point or every day, week, month, quarter)•Underlying documents may change, but their old state remains
Other … (you tell us)

(Notes)QueryResultsProcessor (QRP)•

Quick API overview••••(Notes)QueryResultsProcessor instance – in a host(Notes)Database
AddDominoQuery or AddCollection – must have at least
one named set of documents
AddColumn – must have at least one programmatic name,view column title, formula and attributes
AddFormula – to override the formula for any named
column and named set(s) of documents

QRP views DEMO

(Notes)QueryResultProcessor flow
Input(Notes)DocumentCollections
doccol1

Quick fetch
including DQL executes(uses formula overrides)

v12.0.0

DQL1

ftdoccolCombineFetch

Sort

Specified
outputv12.0.1

Dbsearch
doccolView

DQL2

Optional join/lookup (TBD)

Domino sort service

Thoughts on Results (QRP) views• Consider how you create a view in Designer, at minimum you need••

Selection criteria
Columns to compute view data, sort it, etc.

• QRP views are the same, though programmatic, and allow separate••

Selection criteria for each set of documents
Computed column rules for each set of documents• QRP views are different in that•••

Their data spans databases and sets of documents
Built as query results, not as refreshable, replicable design elements
Created to expire, be programmatically rebuilt and populated

QRP views – vital concepts• Results views (or QRP views):•••••••••Are secured at the VIEW LEVEL – you pass in a readers list (or “*”)Are hidden views
Are designed to expire and be purged automatically• You can override – 8760 hours is one year
Can contain data from any database given any criteria
Can be stored in any database (recommend – create a dedicated QRP db)
Have artificial NoteIDs that can be found in the view but nowhere else
Have hidden column at the end to provide database path and original NoteID
Support categorization, hidden columns, aggregates for average and sum
From the HCL Notes® UI, will open the original document with double click

QRP views admin• To see what QRP views exist in a database, use> show database QRPHost.nsf e
QRP Host Database
Results View sizes
Bytes
Expires(5CTADADATDHTA)
2,058,496
10/12/2021 01:18:49 PM(Trudi 2017 Autumn Sales)571,296 10/19/2021 04:11:17 PM(SalView)
4,871,612
10/19/2021 03:03:51 PM• QRP views will expire on their own but to delete a QRP view either
use backend (Notes)View remove call ornupdall QRPhost.nsf -Tx SalView…
Results view (SalView) in c:\domino\data\QRPhost.nsf deleted (expiration 10/19/2021 03:03:51 PM)QRP views restrictions• Results views (or QRP views) are••••

Are NOT refreshed – you must delete and recreate
Do NOT replicate
Do NOT enforce document security – unless one tries to open the original
document
Do NOT tolerate Designer changes to their structure (e.g. add column)• Display (fonts and colors) CAN be modified successfully• Results are unpredictable if you do modify structure and you will need torebuildQuestions/CommentsQUESTIONS?
Use the GoToWebinar Questions Pane
Please keep all questions related to thetopics that our speakers are discussing!!!
Unrelated Question => post at:
http://openntf.slack.com/