Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am not able to get any solution even after referring to all the available document with me. I know everything will not be there straight forward in the document. But though i posted this problem many times in the forum i did not managed to get the solution for my problem. So thought to put the new post in little different way for better understanding for the experts who can give solution for this problem.
Using below sql i used to get the USER's userid and password from the items table.
select i.c_account_code as account,i.c_item_code as itemcode,c_pack as pack,
i.c_mfac_code as mfaccode,rtrim(i.c_name)+' '+rtrim(i.c_pack) as itemname,
rtrim(i.c_account_code)+rtrim(i.c_mfac_code) as userid,rtrim(m.c_password) as password,
--rtrim(i.c_account_code)+rtrim(m.c_loginid) as userid,rtrim(m.c_password) as password,
i.n_mrp as MRP,i.n_newflag as recentitem,i.c_Scheme as schemes,m.c_name as mfacname,
c.c_name as contentname,c.c_note as contentname1
from item_mst i inner join mfac_mst m on i.c_mfac_code=m.c_mfac_code
left outer join content_mst c on i.c_content_code=c.c_content_code;
But for getting the ADMIN's userid and password is giving me trouble. To get the details i need to connect to the mfac_mst table. But due to the synthetic key problem i did not connect that. Let me know how can i get the ADMIN's user id and password from the current structure. Do i need to use the inline function to get the admin details ??? If yes let me know how to use it here to get the same and give the admin rights for the document.
I have also don't know how to define the USER and ADMIN user of my document. In my current structure i don't know how to define the same.
If i load the admin details using the below code it creates one more synthetic key.
select c_mfac_code as mfaccode,c_account_code as account,rtrim(c_account_code)+rtrim(c_mfac_code) as userid,c_password as password from mfac_mst where c_mfac_code in ('01','admin')So i am confused what to here! I want to have the admin login very urgently in my document. For example when admin logins in my document he/she should be in a position to see all the details related to the logged in admin's account. For eg if if admin logs in with the account code 001001 he should be in a position to see the data related to 001001 and if the admin logs in with account code 001007 he should be in position to see the data related to 001007.
I have also attached the document which i am working on. Hope some one can help me out soon. It is very very urgent!
To open the document you can use userid:0010012021, password:c2info99.
Expecting some quick reply from the experts!
Thanks and Regards,
Rikab
Hi
This should give you enough idea. Not sure why it's taking you too long to figure this out, may be you need to hire some help. --> I agree with your point. I did took long time! May be you are right1 I may need to hire some help. As I am the only person 4m my organization working on this. So some times few simple thing also looks tougher for me. I also go through the help document but as expected no one will give straight forward answer in the document. We need to work on it. That's the reason to so much of time.
Sorry If I had taken so much time of yours. I will check the document which you have sent and will get back to you if any doubts are there.
Really Really sorry for taking so much time of yours.
I really appreciate your help that you gave these many days!
Thanks and Regards,
Rikab
Hi Rakesh!
Really sorry to trouble you again. I know it may be simple thing but I don't know why I am not getting that grip in Section Access login. I tried the same logic that has been used by you in yours but it doesn't seems to be working in mine when I load the data directly from data source instead of qvd like yours. The problem is it is not taking the %key as it is showing some error message.
Can you do the same changes as per my load script which is attached with this post then in that case I feel it may be easy for me to understand.
Thanks in advance!
Regards,
Rikab
Hi Rakesh!
Sorry to trouble you again. When I use the same logic that you have used in yours while loading the data directly from the data source instead of qvd files it showing some error message. Problem is that while loading directly it is not allowing %key while loading. So can you please do the required changes in the script attached by me then i feel it will be easy for me to understand what changes you have did. I know it may be bit silly but i don't know why i am not able to get enough grip in section access part.
Sorry again to trouble you again. Hope you will do the required changes in mine so that i can understand the logic and apply the same without your help.
Thanks in advance,
Regards,
Rikab
Hi Rakseh Mehta!
I have some doubt in the following load script of yours. Please clarify the same!
CONCATENATE (SecurityTable)
LOAD DISTINCT
'USER' as [ACCESS],
upper(account) as [USERID],
upper(account) as [PASSWORD],
upper(account) as SecurityAccount,
'*' as SecurityMfa // Let me know what it does. What data will it will retrieve.
resident TempTab;
Thanks and Regards,
Rikab
Hi Rakesh!
Sorry for asking silly doubts like the one which i have asked below. '*' means it will show the data of all the manufacturers. Myself felt bad when for not knowing this before posting this query.
<pre>CONCATENATE (SecurityTable)
LOAD DISTINCT
'USER' as [ACCESS],
upper(account) as [USERID],
upper(account) as [PASSWORD],
upper(account) as SecurityAccount,
'*' as SecurityMfa // Let me know what it does. What data will it will retrieve.
resident TempTab;
Regards,
Rikab
Hi Rakesh!
Thanks for your effort. I have done the required changes in my document and it is working same like yours. Though the login is working i need to check the result. As in your document you considered only account as the link between both tables but in my document i used both the account and mfaccode as the link, so need to check the result set first.
1. When i use the account:001001 and the mfaccode:2021 it works now and previously also it was working. But need to check the result set.
2. I have not loaded the admin login in document yet due to sythetic key issue. But as per you, you have considered user with id:001001 and pwd:001001 acts as a admin of 001001. So need to check how to pull the admin data in to document and then check whether the same document is working or not.
3. To see the overall data you have added id:admin and pwd:admin. Though it is not required in the current document it will be definitely useful in the future.(Thanks for that)
Now I want to sheet wise access according to the logged in user. Let me know how to do that please.
Thanks for your effort and your precious time.
Waiting for your reply!
Thanks and Regards,
Rikab
Hi Rakesh!
There has been lots of variation in the result. I think this may be due to the %key field. As In my document I used to connect the tables using account+mfacode but I think where as in yours it is connected with %key field.
After reloading both the old document and your document. If i select account:001001 mfaccode:2021 it is showing exact value in both. But if I login with the same account and mfaccode in both the document there has been huge mismatch in the result. Please try to let me know the cause of this problem.
Old document:
New Document:
Hope you can see the difference between both. Please check why is happening like that.
Thanks and Regards,
Rikab
Hello Rakesh!
I tried here to load the admin login from mfac_mst as i don't wanted to load from inline function as the login information will keep changing. But the problem here is it looks like the same way we used to load the user login information.
http://community.qlik.com/forums/t/27224.aspx
// Loading admin login from mfac_mst
CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=mercury;Initial Catalog=VPDPL-1;Data
Source=GL28;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GL28;Use Encryption for
Data=False;Tag with column collation when possible=False];
Tab1:
select * from mfac_mst;
select rtrim(c_account_code)+rtrim(c_loginid) as userid,rtrim(c_password) as password,c_account_code as SecurityAccount,
'*' as SecurityMfa from mfac_mst where c_loginid in('vadmin','admin');
drop table Tab1;
//////////////////////////////////////////////
SecurityTable:
LOAD DISTINCT
'USER' as [ACCESS],
upper([userid]) as [USERID],
upper([password]) as [PASSWORD],
upper(account) as SecurityAccount,
upper(mfaccode) as SecurityMfa,
'Some' as SecurityPage
resident TempTab;
// New one for admin
CONCATENATE (SecurityTable)
LOAD DISTINCT
'USER' as [ACCESS],
upper([userid]) as [USERID],
upper([password]) as [PASSWORD],
upper(account) as SecurityAccount,
'*' as SecurityMfa,
'Some' as SecurityPage
resident TempTab;
// Old one for admin. Here there is a difference so we can clearly differentiate. But for the above one there is no difference.
CONCATENATE (SecurityTable)
LOAD DISTINCT
'USER' as [ACCESS],
upper(account) as [USERID],
upper(account) as [PASSWORD],
upper(account) as SecurityAccount,
'*' as SecurityMfa,
'Some' as SecurityPage
resident TempTab;
Please help me out!
Thanks in advance,
Rikab
Hello Rakesh,
Please help me out I am waiting for your solution.
Thanks and Regards,
Rikab