Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Afternoon;
I have a need to split data on one dashboard between three people.
Example. I have three supervisors who manage different individuals. Upon logging into the dashboard i need them to see only the information related to those individuals they supervise.
How can this be accomplished?
Thank you in advance
Rich
no error, it just wont publish to access point, just says failed. The field name is actually "Target"
GroupMap2:
MAPPING LOAD * INLINE [
Source, Target
I have renamed it now though. for some reason if i take the section access it publishes, but when i put it in it fails. Could i be missing something else?
Sorry did not get you. What is this mapping table for? And you said Target is the field what is this field you mean this is matching to Division? If possible can you share your script please to look into?
Thank you for any help you can provide.
I don't get a specific error just when I'm trying to publish it fails, seems to reload just fine
Please see below;
Section Access;
LOAD * INLINE [
ACCESS, NTNAME, TARGET
ADMIN, vcehqs\user 1, *
ADMIN, vcehqs\user 2, *
USER, vcehqs\user 3, WBO
USER, vcehqs\user 4, VCE
USER, vcehqs\user 5, ATC
USER, wbo\user 6, WBO
USER, vce\user 7, VCE
];
Section Application;
$(Include=..\..\setup\connection.qvs);
$(Include=..\..\..\framework\common\connection-cp.qvs);
HCOrgMap:
MAPPING LOAD
HR_ORG_ID,
HR_ORG_DESC;
SELECT * FROM DELTEK.HR_ORG_MGR_DFLT;
HCAgingTable2:
LOAD * INLINE [
FromAge2, ToAge2, AgeRange2, AgeDesc2
72.9, 100, Traditionalists, born before 1946
53, 72.899, Baby Boomers, born 1946 to 1964
41, 52.9999, Generation X, born 1965 to 1976
21, 40.999, Generation Y, born 1977 to 1997
0, 20.999, Generation Z, born after 1997
];
HCAgingTable:
LOAD * INLINE [
FromAge, ToAge, AgeRange
0, 29, 0-29
30, 39, 30-39
40, 49, 40-49
50, 59, 50-59
60, 100, 60 +
];
GroupMap2:
MAPPING LOAD * INLINE [
Source, Target
1 ,ATC
2 ,ATC
3 ,ATC
4 ,WBO
5 ,WBO
6 ,ATC
7 ,VCO
8 ,VCO
9 ,ATC
10 ,ATC
11 ,VCE
12 ,ATC
13 ,WBO
14 ,WBO
15 ,VCE
];
HCEMPL:
LOAD* where HCYear>=2013;
LOAD *,
Year(HCHireDate+iterno()-1) as HCYear,
Month(HCHireDate+iterno()-1) as HCMonth,
NUM(Month(HCHireDate+iterno()-1)) as HCMonthNo,
Day(HCHireDate+iterno()-1) as HCDay,
Date(HCHireDate+iterno()-1) as HCDate,
1 as HCCount
while (date(HCHireDate)+iterno()-1) <= date(HCTERM_DT);
LOAD
HCID
,HCStatus
,HCGroup
,HCEntity
,HCHireDate
,HCTenure
,HCBirthDT
,HCAge
,HCGender
,HCRace
,HCTERM_DT
,HCLastName
,HCFirstName
,HCLastName &', '& HCFirstName as HCName;
//WHERE match(HCEntity, 'ICRC', 'VSS', 'BVA')=0;
LOAD
TEXT(EMPL_ID) as HCID,
date(BIRTH_DT) as HCBirthDT,
//age(now(), BIRTH_DT) as HCAge,
//age(now(), ORIG_HIRE_DT) as HCTenure,
Num((fabs(Date(now(),'DD/MM/YYYY')) - fabs(Date(BIRTH_DT,'DD/MM/YYYY')))/365, '#,##0.00')as HCAge,
(fabs(Date(now(),'DD/MM/YYYY')) - fabs(Date(ORIG_HIRE_DT,'DD/MM/YYYY')))/365 as HCTenure,
SEX_CD as HCGender,
S_RACE_CD as HCRace,
//trim(ApplyMap ('DivisionMap1', upper("TAXBLE_ENTITY_ID"), upper("TAXBLE_ENTITY_ID"))) as [HCDivision],
trim(ApplyMap ('GroupMap2', upper("TAXBLE_ENTITY_ID"), upper("TAXBLE_ENTITY_ID"))) as [HCGroup],
if(TAXBLE_ENTITY_ID='1', 'GLOBAL', if(TAXBLE_ENTITY_ID='ULTRA', 'WHEELER', TAXBLE_ENTITY_ID)) as HCEntity,
//if(TAXBLE_ENTITY_ID='1', 'GLOBAL', TAXBLE_ENTITY_ID) as HCEntity,
//SSN_ID,
date(ORIG_HIRE_DT) as HCHireDate,
S_EMPL_STATUS_CD as HCStatus,
FIRST_NAME as [HCFirstName],
LAST_NAME as [HCLastName],
//ADJ_HIRE_DT,
//Year (TERM_DT) as TYear,
//Month (TERM_DT) as TMonth,
//num(Month (TERM_DT)) as [Pd No],
if(isnull(TERM_DT), today(), date(TERM_DT)) as HCTERM_DT;
LOAD *
FROM data\qvd\EMPL.qvd(qvd) where S_EMPL_STATUS_CD='ACT' and left(EMPL_ID, 2)<>'CE' AND NOT ISNULL(EMPL_ID);
JOIN
IntervalMatch ( HCAge )
LOAD FromAge, ToAge RESIDENT HCAgingTable;
JOIN
IntervalMatch ( HCAge )
LOAD FromAge2, ToAge2 RESIDENT HCAgingTable2;
Load Section Access Script after all other script...
Where is the Field named TARGET in your data model?
I do not see it in the script....
If I'm not wrong It should rather be HCGROUP
$(Include=..\..\setup\connection.qvs);
$(Include=..\..\..\framework\common\connection-cp.qvs);
HCOrgMap:
MAPPING LOAD
HR_ORG_ID,
HR_ORG_DESC;
SELECT * FROM DELTEK.HR_ORG_MGR_DFLT;
HCAgingTable2:
LOAD * INLINE [
FromAge2, ToAge2, AgeRange2, AgeDesc2
72.9, 100, Traditionalists, born before 1946
53, 72.899, Baby Boomers, born 1946 to 1964
41, 52.9999, Generation X, born 1965 to 1976
21, 40.999, Generation Y, born 1977 to 1997
0, 20.999, Generation Z, born after 1997
];
HCAgingTable:
LOAD * INLINE [
FromAge, ToAge, AgeRange
0, 29, 0-29
30, 39, 30-39
40, 49, 40-49
50, 59, 50-59
60, 100, 60 +
];
GroupMap2:
MAPPING LOAD * INLINE [
Source, Target
1 ,ATC
2 ,ATC
3 ,ATC
4 ,WBO
5 ,WBO
6 ,ATC
7 ,VCO
8 ,VCO
9 ,ATC
10 ,ATC
11 ,VCE
12 ,ATC
13 ,WBO
14 ,WBO
15 ,VCE
];
HCEMPL:
LOAD* where HCYear>=2013;
LOAD *,
Year(HCHireDate+iterno()-1) as HCYear,
Month(HCHireDate+iterno()-1) as HCMonth,
NUM(Month(HCHireDate+iterno()-1)) as HCMonthNo,
Day(HCHireDate+iterno()-1) as HCDay,
Date(HCHireDate+iterno()-1) as HCDate,
1 as HCCount
while (date(HCHireDate)+iterno()-1) <= date(HCTERM_DT);
LOAD
HCID
,HCStatus
, Upper(HCGroup) as HCGROUP
,HCEntity
,HCHireDate
,HCTenure
,HCBirthDT
,HCAge
,HCGender
,HCRace
,HCTERM_DT
,HCLastName
,HCFirstName
,HCLastName &', '& HCFirstName as HCName;
//WHERE match(HCEntity, 'ICRC', 'VSS', 'BVA')=0;
LOAD
TEXT(EMPL_ID) as HCID,
date(BIRTH_DT) as HCBirthDT,
//age(now(), BIRTH_DT) as HCAge,
//age(now(), ORIG_HIRE_DT) as HCTenure,
Num((fabs(Date(now(),'DD/MM/YYYY')) - fabs(Date(BIRTH_DT,'DD/MM/YYYY')))/365, '#,##0.00')as HCAge,
(fabs(Date(now(),'DD/MM/YYYY')) - fabs(Date(ORIG_HIRE_DT,'DD/MM/YYYY')))/365 as HCTenure,
SEX_CD as HCGender,
S_RACE_CD as HCRace,
//trim(ApplyMap ('DivisionMap1', upper("TAXBLE_ENTITY_ID"), upper("TAXBLE_ENTITY_ID"))) as [HCDivision],
trim(ApplyMap ('GroupMap2', upper("TAXBLE_ENTITY_ID"), upper("TAXBLE_ENTITY_ID"))) as [HCGroup],
if(TAXBLE_ENTITY_ID='1', 'GLOBAL', if(TAXBLE_ENTITY_ID='ULTRA', 'WHEELER', TAXBLE_ENTITY_ID)) as HCEntity,
//if(TAXBLE_ENTITY_ID='1', 'GLOBAL', TAXBLE_ENTITY_ID) as HCEntity,
//SSN_ID,
date(ORIG_HIRE_DT) as HCHireDate,
S_EMPL_STATUS_CD as HCStatus,
FIRST_NAME as [HCFirstName],
LAST_NAME as [HCLastName],
//ADJ_HIRE_DT,
//Year (TERM_DT) as TYear,
//Month (TERM_DT) as TMonth,
//num(Month (TERM_DT)) as [Pd No],
if(isnull(TERM_DT), today(), date(TERM_DT)) as HCTERM_DT;
LOAD *
FROM data\qvd\EMPL.qvd(qvd) where S_EMPL_STATUS_CD='ACT' and left(EMPL_ID, 2)<>'CE' AND NOT ISNULL(EMPL_ID);
JOIN
IntervalMatch ( HCAge )
LOAD FromAge, ToAge RESIDENT HCAgingTable;
JOIN
IntervalMatch ( HCAge )
LOAD FromAge2, ToAge2 RESIDENT HCAgingTable2;
Star is *;
Section Access;
LOAD * INLINE [
ACCESS, NTNAME, HCGROUP
ADMIN, vcehqs\user 1, *
ADMIN, vcehqs\user 2, *
USER, vcehqs\user 3, WBO
USER, vcehqs\user 4, VCE
USER, vcehqs\user 5, ATC
USER, wbo\user 6, WBO
USER, vce\user 7, VCE
];
Section Application;
Try now?
I believe you cannot use Target as it is a field from mapping table. Coz mapping table will be dropped automatically after the end of the script. So use like below and try?
Section Access;
LOAD * INLINE [
ACCESS, NTNAME, HCGroup
ADMIN, vcehqs\user 1, *
ADMIN, vcehqs\user 2, *
USER, vcehqs\user 3, WBO
USER, vcehqs\user 4, VCE
USER, vcehqs\user 5, ATC
USER, wbo\user 6, WBO
USER, vce\user 7, VCE
];
Section Application;
And before you publish on to QMC please check Generate log file check box from Document properties of your qvw file. So that if you have any errors it will create a document log.
Thank you, I was able to get it to load, however it still wont publish to the access point. I got a log file and cant see any issue. All i see is the screen shot attached. I went to the location of the log files for the server and cant see anything helpful there, i am completely stuck.
LOAD
HCID
,HCStatus
, Upper(HCGroup) as HCGROUP
.
..
.............
in your preceding load
and finally at the end of the script, not in first...
Star is *;
Section Access;
LOAD * INLINE [
ACCESS, NTNAME, HCGROUP
ADMIN, vcehqs\user 1, *
ADMIN, vcehqs\user 2, *
USER, vcehqs\user 3, WBO
USER, vcehqs\user 4, VCE
USER, vcehqs\user 5, ATC
USER, wbo\user 6, WBO
USER, vce\user 7, VCE
];
Section Application;
IF you are not one of the users in ADMIN groups then it will not distribute to you. You should add your login to SECTION ACCESS in order to view that dashboard in Access Point.