Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
manishnarang
Partner - Creator
Partner - Creator

Autonumber in Combined Key in Section Access

HI All,

in an application, i have section access implemented based on two Text Fields.

I understand that i need to:

1. Make the keys in UPPER case in Section Access

2. As well as in Section Application

which doesn't look very nice on the UI though, but still works fine for now.

I just wanted to use a combined key (which becomes a long text key) and assign it a numeric value using AutoNumber() function.

so i have

Autonumber(Col1&Col2) as Key

in Section Access as well as in Data tables.

But this does not seem to work. it does not let me open the dashboard in Access Point.

To me, it seems like Autonumber is assigning numbers to combinations loaded in Section Access and then continuing that counter in the Data. But just a guess.

Anyone has any insights from prior experiences?

Best, Manish

8 Replies
rubenmarin

Hi Manish, try to use KEY (all upercase) as field name.

Also you can test first if this works without autonumber.

manishnarang
Partner - Creator
Partner - Creator
Author

Hi Ruben,

That i have already tried and it works fine.. I just wanted to use the same concept we use to remove synthetic keys.. make a combined key and use a autonumber() on that.. to make the joins faster.. i though i could make the initial reduction faster by doing the above stated.

anyone else, any thoughts please ?

Best, Manish

rubenmarin

Hi Manish, you tried the first part of my post? using KEY as field name, all uppercase, in section access and section application.

ziadm
Specialist
Specialist

Syntax:

AutoNumber (expression [, AutoID])

Try using the AutoID parameter as KeyID

Example:

LOAD AutoNumber (Col1& Col2, 'KeyID') AS KEY_FIELD

manishnarang
Partner - Creator
Partner - Creator
Author

No Ziad, it didn't work with KeyID as second parameter.

Has anyone used AutoNumber() with Section Access?

rubenmarin

If using all uppercased field name still doesn't works can be because autonumber uses a different lookup table when changing sections (just guessing), creating all autonumber in the same section can avoid the issue, something like this:

Section application;

Your actual section application...

Access: //Inside section application

LOAD Autonumber(Col1&Col2) as KEY, otherFields...

Section access;

Security:

LOAD * Resident Access;

Section application;

DROP Table Access;

ziadm
Specialist
Specialist

Hi Kumar

Not able to open the dash board mean you are not being granted the access and this should not be Autonumber is the problem .. How about the ADMIN is he able to access the Dashboard. 

Please post a sample of the section access code in here.  Sometimes leaving commas out will be ignored by Qlik compiler and you think that security access is ok

please post a sample of the security access

manishnarang
Partner - Creator
Partner - Creator
Author

Hi Ruben,

Implemented the way you said. unfortunately i can't copy the code/data here. i will create a sample application with dummy data and will post here for your suggestions.

Just FYI, After implementing the above, It didn't simply kick me out but started asking for UserName and Password, whereas I am using NTNAME in section access. Not sure what changed internally.

Anyways, thanks ,, will post the sample app and data soon.

thanks..