Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I create multiple profiles in Section access files:
I have more users.
Each user has permission to see only some values of specified fields. An example
Mario Rossi can see the value "ZS2" for the field AURAT ,
all those starting with "ZW" (identified by ZW*)
all values from 0 to ZOF (0,ZOF),
all values from ZOH to ZZZZ (ZOH ,ZZZZ)
USERNAME | FIELD | LOW | HIGH |
Mario Rossi | AUART | ZS2 | |
Mario Rossi | AUART | ZW* | |
Mario Rossi | AUART | 0 | ZOF |
Mario Rossi | AUART | ZOH | ZZZZ |
Hi Adrea,
You can load your section access statement from the same data source as the rest of the data is coming from. I suspect you could therefore fashion a select statement that returned a row for each value that Mario could see?
For SQL Server it would be something a bit like:
SELECT
'Mario Rossi' as USERNAME,
AUART
FROM SourceTable
WHERE
AUART = 'ZS2'
OR AUART LIKE 'ZW%'
OR AUART BETWEEN '0' AND 'ZOF'
OR AUART BETWEEN 'ZOH' AND 'ZZZZ'
UNION ALL
SELECT
'Someone Else' as USERNAME ,
.....
The most tidy way of doing this would probably be to build the logic for the security into a view, so a more simple select statement would appear in your load script.
Hope that helps.
Regards,
Steve
Hi Adrea,
You can load your section access statement from the same data source as the rest of the data is coming from. I suspect you could therefore fashion a select statement that returned a row for each value that Mario could see?
For SQL Server it would be something a bit like:
SELECT
'Mario Rossi' as USERNAME,
AUART
FROM SourceTable
WHERE
AUART = 'ZS2'
OR AUART LIKE 'ZW%'
OR AUART BETWEEN '0' AND 'ZOF'
OR AUART BETWEEN 'ZOH' AND 'ZZZZ'
UNION ALL
SELECT
'Someone Else' as USERNAME ,
.....
The most tidy way of doing this would probably be to build the logic for the security into a view, so a more simple select statement would appear in your load script.
Hope that helps.
Regards,
Steve