Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
rajtechnocraft
Contributor III
Contributor III

Use select * from user_info table in section access

Hi Experts

I have a user table created in SQL db

can i use the select * from dbo.user_info  in section access statement

At the same time i want to restrict the users at country level do i then have to add country column to user_info table

Any help will be much appreciated

Regards

Raj

6 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Yes you can use the sql statement to load the section access data, but make sure that you have all the required fields like Access, NTName and field on which you want to have restriction.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
rajtechnocraft
Contributor III
Contributor III
Author

Hi Kaushik,

Can you provide me a sample test file with the required input fields in SQL query

Regards

Raj

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     The list may vary according to your requirement of Section Access implimentation.

     Say for example, if you want to have user name and password defined by you then you will require following fields.

Access, UserName, Password, Field_of_Restriction.

     If you want to impliment using the NTName, you will require.

     Access,NTName, Field_of_Restriction.

     You can go through the attachment file for more information on each field.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
rajtechnocraft
Contributor III
Contributor III
Author

Will it be something like this

Section Access;

LOAD " ACCESS",

         "PASSWORD",

         "COUNTRY_ID',

        "USERID"

SQL select * from"DB_Data".dbo."USER_INFO";

Section Application;

LOAD "USERID",

          "COUNTRY_ID"

SQL select * from "DB_Access".dbo."USER_Country";

Regards

Raj

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     It should be like this.

     Section Access;

     Load *;

     Select Access,UserName,Password,Country_ID from xyz;

     Section Application;

     Load *;

     Select Country_ID from PQR;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
hic
Former Employee
Former Employee

Yes, you can use SELECT * in Section Access. But I think it is bad practice. It is better to only load the fields you really want.

If you want to use Section Access for authorization by country, then you need to add the country column, yes. However, you can have several tables in Section Access. You could have e.g. NTNAME and USERGROUP in one table and USERGROUP and COUNTRY in a second. NTNAME will then link to COUNTRY just as you would expect.

HIC