Focal Point
[SOLVED] Setting database client identifier before retrieving records

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6371022503

November 03, 2008, 09:19 AM
Padma
[SOLVED] Setting database client identifier before retrieving records
We have a requirement to show the report contents based on user id. We are using Oracle 10g VPD policies to apply data authorization. We are using SiteMinder for authenticating users into Webfocus environment. We retrieve login user id from the SiteMinder header variable and set the client identifier before the report is generated.(exec dbms_session.set_client_identifier('userid')Wink This works perfectly within our FEX file. I need to apply the same logic to display drop down boxes in HTML files(we populate drop down boxes with column values from a database table)
I have attached FEX sample code which displays data based on userid

SQL SQLORA
-MRNOEDIT EX SET_DB_CONTEXT '&REMOTE_USER';
TABLE FILE SQLOUT
END
TABLE FILE fund_master
PRINT *
END

This message has been edited. Last edited by: Kerry,


Webfocus: 7.1.7/ OS: AIX Platform: Websphere
November 03, 2008, 10:31 AM
dhagen
You should include the context setting in the _site_profile. The _site_profile allows you to include a FEX that will be executed whenever a WF request is executed. You can get to the site profile setting in the client admin console under "Configuration/General".


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
November 13, 2008, 11:48 AM
Kerry
FYI, Padma has not tried the option suggested yet and will take few more days to post the update. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
November 17, 2008, 03:06 PM
Padma
Thank you for the suggestion. We made changes in our site profile to include the common fex. I also verified that common fex is called before HTML file is loaded but the result is not as expected. Basically we are trying to restrict of list of values shown in drop down box based on login user id. For example, if fund_master table has following records 001, 002,003,004,005, when user A runs the HTML report, user A should be able to see only 001, 002, 003 values from the drop down. When user B runs the same report, user B should be able to see only 001, 002, 003, 004 values.
We are using MAS (webfocus synonym) to populate the drop down boxes. I am assuming webfocus synonym uses default user configured in the data adapter. In our case the adapter is configured with application user(RPTUSER). Next step I want to try is, to add few records in fund_master table for RPTUSER and see if the drop down shows values as expected.

If anybody has any other suggestions please let us know


Webfocus: 7.1.7/ OS: AIX Platform: Websphere
November 17, 2008, 03:54 PM
GinnyJakes
Have you tried using a procedure with a WHERE clause to populate your dropdown box?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google