Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following code.
The "BinarySalesPerson.qvw" has the complete Employee table.
In the below code I am trying to implement section access. And based on the values from Section Application table (SECTAB) I am trying to create the Mapping table (Mapping_Table1).
I want to display all records from "BinarySalesPerson.qvw" for matching EID (based on Section Access) "Found" should be displayed else "Not Found" should be displayed.
The Section Access works prefect.
But for BinaryEMP table it always displays "Found" irrespective of Mapping.
Also, for the EID which are more than one value, it displays "Found" for first record and for rest of records '-'
Please suggest.
BINARY [BinarySalesPerson.qvw];
SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='Rs. #,##0.00;Rs. -#,##0.00';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
OLEDB CONNECT TO SQL CONNECTION String;
SECTION ACCESS;
LOAD * INLINE [
ACCESS, USERID, EMPLOYEEID,OMIT
ADMIN, ADMIN
USER, UK, 4,ShipRegion
USER, USA, 1,Shipregion
USER, USA, 3,Shipregion
USER, USA, 2,Shipregion
];
SECTION APPLICATION;
SECTAB:
SQL SELECT [OrderID]
,[CustomerID]
,[OrderDate]
,[EmployeeID] AS EMPLOYEEID
,[RequiredDate]
,[ShipRegion]
,[ShipPostalCode]
,'****' AS [Shipregion]
,UPPER([ShipCountry]) AS REGION
FROM Orders;
Mapping_Table1:
MAPPING LOAD Distinct
EMPLOYEEID,
'Found'
RESIDENT SECTAB;
BinaryEMP:
LOAD
EID
,ApplyMap('Mapping_Table1', [EID],'Not Found') as EMPLOYEEID_1
,[LastName]
,[FirstName]
,[Title]
Resident Employees;
Remove Square Brackets and check / please post screen shot for en-count the error.
I have attached the screen shot. In this I am using "UK" as login user.
The "SecTab_EMPLOYEEID" listbox and "SECTAB" table box shows the data with EmployeeID = 4 which is correct as per section access.
The "BinaryEMP" table box show all the data which is correct but in "EMPLOYEEID_1" column the data is displayed as "Found" for all the EID.
I want as for User "UK" only matching EID is 4, the value in "BinaryEMP" table box should display value "Found" for EID = 4 and for rest of them it should display "Not Found" under "EMPLOYEEID_1" column.
Please suggest