The advantage of this script is that it takes care about all types of licenses and all possible values.
Unfortunately, you can not automate everything. But you can manage your licenses later and know the state of your licenses Park.
In the manuallef site (Manual LEF), a checksum (in red below) is generated automatically for each request LEF. However, this number is still the same. I asked Qlik to know how it is generate but no answer at this moment
So just pick the url generated during the retrieving and save it in a file to be able to reuse it. To do this, press Ctrl + Shift + i in Chrome for instance and retrieve complete url after src = .
In the script below, the retrieve url is in an inline table :
Load * inline [
FOR i=1 to '$(a)'
GENERIC Load KEY,
SubField(LEF_COR,';',1) as FIELDNAME,
SubField(LEF_COR,';',2) as VALUES;
LOAD replace(mid('$(z)',58,25),'%20','') as KEY,
if(left([@1:n],5)='TIMEL','TIMELIMIT;' & SubField([@1:n],';',4),
if(left([@1:n],8)='PRODUCTL','PRODUCTLEVEL;' & SubField([@1:n],';',4),
if(index([@1:n],'-')=0,if(iterno()=1,'LICENCE;' & [@1:n],'ETAT;Active'),'CODE;'& [@1:n]),[@1:n])))) as LEF_COR,
[@1:n] as LEF
FROM [$(z)](fix, codepage is 1252) while iterno()<=if(len(KeepChar([@1:n],'0123456789'))=16,2,1);
Hope it helps.