ClassMethod OnPage() As %Status [ ServerOnly = 1 ]
    //just the query string...
    set qs=%request.CgiEnvs("QUERY_STRING")
    //SOLUTION 1: $piece only
    set externalCenterCode=$p(qs,":")	
    set startDateRange=$p($p(qs,":authoredOn=le",2),":")
    set endDataRange=$p($p(qs,":authoredOn=ge",2),":")

    //SOLUTION 2: generic solution if params grow	
    for i=1:1:$l(qs,":") {
        set nvp=$p(qs,":",i),name=$p(nvp,"=",1),value=$p(nvp,"=",2)
        //fix the quirks
        if value="" set value="name",name="ecc"
        if name="authoredOn" set name=$e(value,1,2),value=$e(value,3,*)
        set params(name)=value

    //SOLUTION 3: regex(ish) solution
    set code=$p(qs,":")
    set loc=$locate(qs,"le\d{4}-\d{2}-\d{2}")
    set start=$e(qs,loc+2,loc+11)
    set loc=$locate(qs,"ge\d{4}-\d{2}-\d{2}")
    set end=$e(qs,loc+2,loc+11)

    //some helper code to dump the variables into the CSP page
    write !,"<pre>"
    //use this to take a good look at the request object...
    zwrite %request
    write !,"</pre>"
    quit $$$OK

Here are three solutions and a couple of inline tips, including your request for regex example

I wouldn't worry too much about using $piece, its very common to use it in this way

Eduards comment above also has a fourth suggestion to use $lfs (list from string) which is also commonly used as a way of piecing out data

Hi Community and Experts,

Many thanks for all the votes!

I have big plans for Kozo Pages, lots of work still do to, as well as integration with CloudStudio. Not sure I will have time for any more competitions for some while :)

I also have an exciting second part to the Kozo Pages solution that I have not revealed yet, so lots more to come!

Hi Luc. Thanks for the update. I've only been able to test in the latest versions of Chrome and Edge so far.

I was wondering if anyone has tried Safari yet? I suspect it will probably fail until I make direct support for it.

Thanks again for the help getting this working Robert, very much appreciated!

I think you might have missed my point about the adapter being non standard.

E.g. what if the adapter has code like this...

Method OnTask() As %Status
    //Set tSC = ..BusinessHost.ProcessInput($$$NULLOREF)
    Set tSC = ..BusinessHost.General($$$NULLOREF)
    Set ..BusinessHost.%WaitForNextCallInterval=1
    Quit tSC

The normal sequence of

OnTask() → ProcessInput() → OnProcessInput()


OnTask() → General()

Of course this then raises the question, how does the interval then work as it would most likely only run once.

Main point is to check if the adapter has hard wired it in directly. It's the only logical explanation outside of this being an observer error.