Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem in loading the admin login of my document! Help needed very urgently!

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

28 Replies
Not applicable
Author

Hi All,

I don't know whats wrong with this post. I am not getting much reply which and all are related to this post. I don't know why! Is it not understandable or missing any information. But i seriously in need of solution for this problem. Hope members of this community will consider this seriously and provide solution for this problem at the earliest.

Thanks and Regards,

Rikab

disqr_rm
Partner - Specialist III
Partner - Specialist III

Try:


items:
LOAD *, account & '/' & itemcode as %Key;
SQL 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,
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;
concatenate(items)
SQL 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');
sales:
SQL select
stk_sales.c_ac_code & '/' & stk_sales.c_item_code as %Key,
Year(d_date) as Year,
Month(d_date) as Month,
d_date as Date,
n_purqty as PurQty,
n_pur_Sch_qty as PurSch,
n_purvalue as PurValue,
n_salqty as SalQty,
n_sal_sch_qty as SalSch,
n_salvalue as SalValue,
n_crqty as RtnQty,
n_cr_sch_qty as RtnSch,
n_crvalue as RtnValue,
n_clqty as StkQty,
n_clvalue as StkValue
from stk_sales, item_mst, mfac_mst
where stk_sales.c_item_code=item_mst.c_item_code and item_mst.c_mfac_code=mfac_mst.c_mfac_code;
Section Access;
SecurityTable:
LOAD
'USER' as [ACCESS],
userid as USERID,
upper(password) as PASSWORD,
account as [account code],
mfaccode as [mfaccode]
RESIDENT items;
Section Application;


Not applicable
Author

Hi Rakesh!

Thanks for taking up the challenge. I will surely check it and get back to you at the earliest.

Thanks and Regards,

Rikab

Not applicable
Author

Hi Rakesh!

Thanks for your help and sorry for my late response. I have applied the same script that was given by you in mine but it throws following error. Don't have any idea why this error has been thrown. Please check and help me out!

Thanks and Regards,

Rikab

Not applicable
Author

Hi Rakesh!

Did you found out why we get this error and also look like to what changes you did in my script and why it is required. Please reply me whenever you are free.

Thanks and Regards,

Rikab

disqr_rm
Partner - Specialist III
Partner - Specialist III

Try this:


sales:
LOAD *,
ac_code, & '/' & it_code as %Key;
SQL select
stk_sales.c_ac_code as ac_code,
stk_sales.c_item_code as it_code,
Year(d_date) as Year,
Month(d_date) as Month,
d_date as Date,
n_purqty as PurQty,
n_pur_Sch_qty as PurSch,
n_purvalue as PurValue,
n_salqty as SalQty,
n_sal_sch_qty as SalSch,
n_salvalue as SalValue,
n_crqty as RtnQty,
n_cr_sch_qty as RtnSch,
n_crvalue as RtnValue,
n_clqty as StkQty,
n_clvalue as StkValue
from stk_sales, item_mst, mfac_mst
where stk_sales.c_item_code=item_mst.c_item_code and item_mst.c_mfac_code=mfac_mst.c_mfac_code;
drop fields ac_code, it_code;


Not applicable
Author

Hi Rakesh!

Thanks for your help! I am getting the following error when i tried with your script.

Script which has been used:

<pre>items:
LOAD *, account & '/' & itemcode as %Key;
SQL 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,
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;
concatenate(items)
SQL 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');sales:
LOAD *,
ac_code, & '/' & it_code as %Key;
SQL select
stk_sales.c_ac_code as ac_code,
stk_sales.c_item_code as it_code,
Year(d_date) as Year,
Month(d_date) as Month,
d_date as Date,
n_purqty as PurQty,
n_pur_Sch_qty as PurSch,
n_purvalue as PurValue,
n_salqty as SalQty,
n_sal_sch_qty as SalSch,
n_salvalue as SalValue,
n_crqty as RtnQty,
n_cr_sch_qty as RtnSch,
n_crvalue as RtnValue,
n_clqty as StkQty,
n_clvalue as StkValue
from stk_sales, item_mst, mfac_mst
where stk_sales.c_item_code=item_mst.c_item_code and item_mst.c_mfac_code=mfac_mst.c_mfac_code;drop fields ac_code, it_code;



Not applicable
Author

Hi Rakesh!

Have you found out any why this error was thrown?

Regards,

Rikab

disqr_rm
Partner - Specialist III
Partner - Specialist III

Rikab,

I am not yet 24x7 on cummunity support. I usually logoff about 10PM EST, otherwise my wife thinks I am getting addicted to QlikCommunity. But it's too late now not to be, I guess. 😉

For your probelm take out the comma after ac_code.

sales:
LOAD *,
ac_code, & '/' & it_code as %Key;

Hope this helps.