Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikrambo1
Contributor III
Contributor III

group application failing

 
13 Replies
qlikrambo1
Contributor III
Contributor III
Author

Thanks Rob

marcus_sommer

Please follow the suggestion from Rob and open by Qlik a request to find out if it's a new bug or if there are some new/changed settings within the config-files which prevent the macro-execution.

Beside this there are various alternatives directly within the Qlik script available.

One would be to use a parametrized variable like a user-defined function. It wouldn't be very elegant but quite similar to your used the vbs-function. I have already seen something similar and if I remember correctly it converted hex-timestamps into normal timestamps and I saw it at least twice but unfortunately, I couldn't find it yet. I think one was within a CAL manager tool, maybe this one: CAL-Document-Manager. Maybe Rob or others could remember it, too.

Another possibility would be to use an additionally load which looped through each char of your field-values. I mean something like:

Load *, 'here comes step one of the converting logic';
Load ID, mid(FIELD, iterno(), 1) as CHAR from Source while iterno() <= len(FIELD);

A concatenating of the single-conversions could be done within another preceeding-load with a peek-function or maybe with another aggregation load with concat(). After that you join/map it back to your source.

Probably even more easier might it be to use a mapsubstring() approach for it. Here are two examples which give you an idea what is meant:

Passing-parameter-strings-that-contain-special-characters
for-each-loop

- Marcus

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The module bug aside, here is native Qlik script that will convert a hexadecimal SID to a string representation. 

Set ParseSubSA = if(len($1)>$2, '-'& num(num#(mid($1,$2+6,2) & mid($1,$2+4,2) & mid($1,$2+2,2) &mid($1,$2,2),'(HEX)') ,'0'),'');
Users:
LOAD
UserName,
UserDN,
objectSID,
'S'
&'-'& num(num#(mid(objectSID,1,2),'(HEX)'),'0') // Revision Level
&'-'& num(num#(mid(objectSID,5,12),'(HEX)'),'0') // Authority
& $(ParseSubSA(objectSID,17))
& $(ParseSubSA(objectSID,25))
& $(ParseSubSA(objectSID,33))
& $(ParseSubSA(objectSID,41))
& $(ParseSubSA(objectSID,49))
& $(ParseSubSA(objectSID,57))
as StringSID
FROM ...

The script assumes a max of 6 sub authority values, if you have more just duplicate the line and add 8 to the second parameter.  The ParseSA function will test the length of ObjectSID  so no harm in over-defining. 

 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

qlikrambo1
Contributor III
Contributor III
Author

Thanks Rob, Will try this.