2 Replies Latest reply: Jan 18, 2013 9:54 AM by kvsinfo RSS

    How to dynamically change the #OWNER# substitution variable?

    kvsinfo
      Hi,
      I have APEX 4.2 accesing thru pl/sql gateway, 11gR2 DB and using theme 24 cloudy.

      I have a custom login screen below and its working fine.

      Schema Name: xxx
      User Name: xxxx
      Password: xxx

      My goal is during login the user can select which schema to access. I have 1 workspace with 1 application and it is assigned to multiple schemas. I have 1 parsing schema (APEX_MSTR) and have several app schemas ( 'APPUSER1' AND 'APPUSER2') that all have the same table structures, emp and dept. Both schemas (APPUSER1 AND APPUSERS2) would have both emp and dept tables.

      I have a simple interactive report that is based on the$OWNER#.emp table and since both DB users APPUSER1 and APPUSER2 has emp table I cannot hard code the table name to be schemaname.dept. I'm thinking of setting the #OWNER# with the schema name item on my login screen.

      Can someone let me know how to set the #OWNER% or is this the best way to accomplish this?

      Thanks in advance!