NPrinting API – Qlik Rest SubRoutines v1.2

Hi All,

This is just urgent update of NPrinting.qvs library to allow for its usage with NPrinting February 2020 SR1. This version of NPrinting returns from API response cookie with additional string which needs to be handled differently when creating vCookie variable. The below change is incorporated in library and requires one more parameter to work: vNPVersion variable. This is a variable which value you need to update accordingly to your version and it simply represents year-month-sr version. So for February 2020 SR1 you need to set it to 20200201, where meaning of digits is: 2020 – year, 02 – feb, 01 – SR1.

Below code is added in library to handle rest of it.

 
//  NPrinting version (this is to maintain one library and support for release changes)
//  version (as of now 27 Mar 2020 there is only change prior Feb 2020SR1 and after)
  
     Let vNPVersion    =   '20200201';    // Meaning of digits: 2020 - year, 02 - feb, 01 - SR1
     ...
     ...

// Cookie version
     If $(vNPVersion) < 20200201 Then
        Trace Loading cookie based on NPrinting version prior Feb 2020 SR1 release;
        Let vCookie 	= TextBetween('$(vCookieRaw)','Secure,','Path=/',2);
     Else
        Trace Loading cookie based on NPrinting version equal or post Feb 2020 SR1 release;
        Let vCookie 	= TextBetween('$(vCookieRaw)','SameSite=None,','Path=/',2);
     EndIf
     ;

cheers

Lech

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s