Wwctx_api.get_user only returns PUBLIC

I am trying to determine the user who has logged onto Portal, but this package only returns PUBLIC. I've seen in previous postings that this is the package to use - what am I doing wrong?

Well, I'm almost stumped. As far as I know, you are in a different context when executing a PL/SQL routine directly through the DAD. The username & password are stored with the Portal DAD (similar to old OAS functionality), so the engine doesn't know who you are. You can try using a different DAD w/o username and password stored, but then you'd have to create database schemas for all of your users. In this case, you would probably have to use an OWA package to find out who they are, because they are not logged in to Portal.
A better solution might be to create Forms based on Stored Procedure components for all of your procedures, which would enable you to keep the users in the Portal context. You would just have to create at least one (dummy) parameter for each, because forms based on stored procedures need a parameter.
--Kelly                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • How do you use PORTAL .WWCTX_API.GET_USER

    Hi. I'm a newbie at Portal and Oracle and am having a problem extracting the userID for the logged user. I have
    a form that needs to be populated with the login ID for that session. What exactly do I need so that the field will
    auto-populate with the user's ID. Do I enter the api in the "Default Value" box of the form for that field? What do I need
    to select from the "Default Value Type" dropdown?
    Also, because I'm populating the form with data from the database (it's an update record form), I'd like to "blank" the
    comment field rather than populate it with the info from the DB record. Is that possible?
    Finally, is there any recommendations on manuals or other books to purchase that would answer these types of
    questions. I feel that this is a pretty basic task and should be in a manual somewhere.
    Thanks,
    Ron

    Hi,
    In the default value column specify <portalschema>.wwctx_api.get_user. In the default return type make it "function returns varchar".
    This should help.
    Thanks,
    Sharmila

  • Data Service - only returning 256 chars on text field

    Using FlashBuilder Data Services - PHP service all working fine.
    Except the service is only returning the first 256 chars of a "text" field of my db table.
    The field has more than 256 chars and is marked up via the RTE component
    <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#000000" LETTERSPACING="0" etc...
    The generated code looks like(memberservice.php)
    public function getAllMember_content() {
            $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename" );       
    etc....
    Have tried a few conversions on the sql statement to no avail
    select *, convert(text,data) as data from members
    Any ideas on why this is happening - debugged in charles and its cut off in the response from ZEND/PHP so it in not Flex doing it
    this one is killing me :-)
    rgds
    m

    ok solved - kind of
    phew - it's the generated service code it appears - not sure why it's working for some and not others! head scratching
    this works
    public function getAllItems() {
        $this->connect();
        $sql = "SELECT * FROM member_content";
        $result = mysql_query($sql) or die('Query failed: ' . mysql_error());
        return $result;
    this does not
    public function getAllMember_content() {
            $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename" );       
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            $rows = array();
            mysqli_stmt_bind_result($stmt, $row->id, $row->title, $row->topic, $row->type, $row->data, $row->shortdesc, $row->date_created, $row->date_lastmod, $row->rank, $row->createdby, $row->content_source);
            while (mysqli_stmt_fetch($stmt)) {
              $rows[] = $row;
              $row = new stdClass();
              mysqli_stmt_bind_result($stmt, $row->id, $row->title, $row->topic, $row->type, $row->data, $row->shortdesc, $row->date_created, $row->date_lastmod, $row->rank, $row->createdby, $row->content_source);
            mysqli_stmt_free_result($stmt);
            mysqli_close($this->connection);
            return $rows;
    thanks all for your help
    many thanks
    martin

  • Using wwctx_api.get_user in dbms_rls policy

    We have not been able to succesfully use a call to wwctx_api.get_user in the function we use as a policy for row level security. The package compiles fine. The policy adds fine. When we try to select from the table where the policy is on from portal (LOV, REPORT, DYNAMIC PAGE) we get Ora-28112.
    Help?

    The error code maps to the following message:
    ORA-28112 failed to execute policy function
    Cause: The policy function has one or more error during execution.
    Action: Check the trace file and correct the errors.
    Could you try returning a static value from the security policy and do your select and see if that works.

  • SEARCH (only returns one record?)

    When I run my search, it only returns the first record it finds. Can sombody give me a clue to why it won't return multipule records?
    try{
    //Connect to the Database
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con =
    DriverManager.getConnection("jdbc:odbc:ComfortZoneDB");
    Statement s = con.createStatement();
    String sql = "SELECT * from Hydronics WHERE Keyword LIKE '%"+field+"%' order by Keyword";
    //Contains results from the SQL Query
    ResultSet rs = s.executeQuery(sql);
    // Displays it all out in a table
    while (rs.next()) {
    txt_search1.setText(""+rs.getString(1)+ "|" rs.getString(2) "|"+rs.getString(3)+ "|"+rs.getString(4)+ "|"+rs.getString(5)+ "|"+rs.getString(6)+ "|"+rs.getString(7));
    rs.close();
    s.close();
    con.close();
    catch(SQLException e){
    catch(Exception e){ 
    }

    Sir,
    Slappy presents Table Models 101.
    import java.sql.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.util.*;
    public class SlappyReadOnlyTableModel{
      private LinkedList rows;
      private String[] colnames;
      private int[] coltypes;
      public SlappyReadOnlyTableModel(ResultSet rs)throws Exception{
        ResultSetMetaData rsmd = rs.getMetaData();
        colnames = new String[rsmd.getColumnCount()];
        coltypes = new int[rsmd.getColumnCount()];
        for(int i=0;i<colnames.length;i++){
          colnames[i] = rsmd.getColumnLabel(i+1);
          coltypes[i] = rsmd.getColumnType(i+1);
        rows = new LinkedList();
        // this bit checks the cursor position. if not at the start we move it there IF we can
        if(!rs.isBeforeFirst()){
          if(rs.getType()!=ResultSet.TYPE_FORWARD_ONLY){
            rs.beforeFirst();
        while(rs.next()){
          Object[] arow = new Object[colnames.length];
          for(int i=0;i<arow.length;i++){
            switch(coltypes){
    case Types.BOOLEAN:
    arow[i] = new Boolean(rs.getBoolean(i+1));
    break;
    case Types.DATE:
    arow[i] = rs.getDate(i+1);
    break;
    case Types.INTEGER:
    arow[i] = new Integer(rs.getInt(i+1));
    break;
    case Types.DOUBLE:
    arow[i] = new Double(rs.getDouble(i+1));
    break;
    // I have left out many cases. Adjust as required.
    default:
    arow[i] = rs.getString(i+1);
    rows.add(arow);
    public int getRowCount(){
    return rows.size();
    public int getColumnCount(){
    return colnames.length;
    public Object getValueAt(int row, int column){
    Object[] arow = (Object[]) rows.get(row);
    return arow[column];
    public boolean isCellEditable(int row, int column){
    return false;
    public String getColumnName(int column){
    return colnames[column];
    Save that as SlappyReadOnlyTableModel.
    Then invoke in your code like this...
    ResulSet rs = // whereever you get result set from.
    SlappyReadOnlyTableModel tm = new SlappyReadOnlyTableModel(rs);
    rs.close();
    JTable display = new JTable(tm);
    // now add your table where you likeToday was your lucky day. Please use the API and look at the tutorial for more. http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    Sincerely,
    Slappy

  • HELP!!! wwctx_api.get_user

    I created a PL/SQL Server Page just to show the login information from a login portlet.
    The code follows:
    <%@ page language="PL/SQL" %>
    <%@ plsql procedure="logininfo" %>
    <HTML>
    <HEAD><TITLE>This is a PSP Page!</TITLE></HEAD>
    <BODY>
    <%
    declare
    myname varchar2(50) := portal30.wwctx_api.get_user;
    begin
    htp.print(myname);
    end;
    %>
    </BODY>
    </HTML>
    My Login portlet on success "P_request_url" calls for the above procedure.
    My problem was no matter what user I logged on with, it always dispays "PUBLIC" as the login user. What I need is to get oracle portal user who is curently using the session. WHY? Please Help!
    Thanks!

    there is a diffence between portal.wwctx_api.get_user and portal_sso.wwctx_api.get_user. Check and make sure you are using the api from the right context. You're probably getting the sso user and not the portal user.

  • Lov populated with wwctx_api.get_user

    Hi Friends ,
    I am trying to pull the records in to LOV based on the user login .."select dist from sometable where sname ='wwctx_api.get_user' ,,,But it is not returning any records ..Any help ..thanks in advance ..
    Vi

    Hi,
    I think the single quotes is the problem. It is trying to find a record with the sname = 'wwctx_api.get_user'. It should be
    select dist from sometable where sname = wwctx_api.get_user
    Thanks,
    Sharmila

  • Executing VO only returns 1 record

    Hi,
    I am using Jdev 11.1.1.4.0.
    I have a Read only VO and have a methond in AMImpl class that reads
    ViewObjectImpl componentLOV;
    componentLOV= getComponentsNameOnly();
    componentLOV.setNamedWhereClauseParam("bndComponentName", componentName);
    componentLOV.executeQuery();
    return componentLOV.getAllRowsInRange();This only returns 1 record althought there are more than 1 record.
    If I change the code to componentLOV = getUpdatableVO();, then it returns all the records that meets the condition.
    Any idea?
    Thanks
    Bones Jones
    Edited by: Bones Jones on Jul 13, 2011 10:53 AM
    Edited by: Bones Jones on Jul 13, 2011 10:54 AM

    plz paste the complete method. You need List if you want to work with multiple rows
    here what i copied from the docs
    public class AppModuleImpl extends ApplicationModuleImpl
    public List<ViewRowImpl> findProducts(String location)
    List<ViewRowImpl> result = new ArrayList<ViewRowImpl>();
    ViewObjectImpl vo = getProductsView1();
    vo.setNamedWhereClauseParam("TheLocation", location);
    vo.setForwardOnly(true);
    vo.executeQuery();
    while (vo.hasNext()) {
    result.add((ViewRowImpl)vo.next());
    return result;
    }

  • Form Query button only returns current user's entries.

    Hello.
    I've built a simple form that admins will use to insert some simple information into a table with. They'll insert the names of users, passwords, company info, email, logged in data and created time/by, updated time/by info. The inserting part works fine, but when they query the form, all they get are the records that they've entered. Any records that another user has entered do not show up. A report based on the same table shows all users in the table. The only thing I'm doing that may be of any problem is inserting created by and updated by as a hidden field and defaulting that value to wwctx_api.get_user. I don't see why that should be a problem. Is this a table permissions issue? I've provided manage access to all users of the form.
    Thanks.
    Kurt

    Ton,
    Shouldn't I be able to run that api as a default value for hidden fields, without it impacting the query? I've only attached that value to the created by and updated by columns and made the first insertable only and the second updateable, insertable. I guess I understand. I thought the default value would only be used for new entries, not for all queries. I guess I need to put in a request to our data modeler to add a trigger to the table (my hands are tied for table creation). Actually, I should be able insert some pl/sql code to the portlet to do this. Something to do with the ...after the processing the form option? After inserting the new record through the form, insert created by, created date or update updated by updated date. One thing I still don't get (having only worked with Portal a few days) is how do I make sure I'm associating this insert with the proper record? Thanks.
    Kurt

  • How can I search a file system and only return newer files?

    Sorry the title didn't give me much room to work with. I'm writing a tool which needs to track all the files in an OS. What I'd like to do is make it so my program will only return files that have been modified/created since the last search to add to my program. I was wondering if there's an efficient way to do this other than checking each file's timestamps? Also is there a way to tell from a parent directory whether any files in its directory have been modified/created? I'm looking for ways for Windows and Linux.

    I have no problem checking timestamps but it can be rather time consuming doing this. I don't know if this is quicker but I'd like to sort by modified date and check the time stamps for newer timestamps than the last time I ran. This way if I hit a time stamp equal to my last run I know to stop there. I checked Windows and the folder does tell you whether any file was created/modified in it's directory. However, if a file is created in one of its children's directories it won't update the time stamp. It's unfortunate because I could've avoided the search at a higher level directory otherwise. Without this I'll have to walk the whole structure one way or another. I can still improve the speed but I can't make it as efficient as I'd like.

  • Photoshop CS5 Clicking Done in Camera raw only returns to Bridge

    I have th  latest camera raw and pshop.
    Since i loaded CS5, bridge will not open in pshop, but only returns me to camera raw when I click done or ctl-click done.
    Any suggestions why?
    Thanks
    Hal

    I've got the same problem! but the depicted solution doesnt work for me. did you solve it?

  • Only Return the latest issue of a document

    Hi all,
    I am trying to work out a script to only return the latest issue of a document. In the example below if I was using the correct statement I would only return the issue 3 records (AAA and AAB)
    I am not sure what syntax/operator to use, can anyone help me..
    Document Issue
    AAA 1
    AAA 2
    AAA 3
    AAB 1
    AAB 2
    AAB 3
    I have tried the group by expression and the MAX operator...... to no avail....

    Is this what you need?
    SQL> CREATE TABLE dt_test_docs (        doc_id varchar2(10),
      2                                                     ver number,
      3                                                     updated_by varchar2(10),
      4                                                     updated_timestamp timestamp
      5                                             )
      6  /
    Table created.
    SQL> INSERT INTO dt_test_docs
      2  VALUES('ABC',1,'user1',systimestamp-3)
      3  /
    1 row created.
    SQL> INSERT INTO dt_test_docs
      2  VALUES('ABC',2,'user2',systimestamp-2)
      3  /
    1 row created.
    SQL> INSERT INTO dt_test_docs
      2  VALUES('ABC',3,'user2',systimestamp-1)
      3  /
    1 row created.
    SQL> INSERT INTO dt_test_docs
      2  VALUES('ABC',4,'user3',systimestamp)
      3  /
    1 row created.
    SQL> INSERT INTO dt_test_docs
      2  VALUES('DEF',1,'user3',systimestamp-3)
      3  /
    1 row created.
    SQL> INSERT INTO dt_test_docs
      2  VALUES('DEF',2,'user3',systimestamp-2)
      3  /
    1 row created.
    SQL> INSERT INTO dt_test_docs
      2  VALUES('DEF',3,'user2',systimestamp-1)
      3  /
    1 row created.
    SQL> INSERT INTO dt_test_docs
      2  VALUES('DEF',4,'user1',systimestamp)
      3  /
    1 row created.
    SQL>
    SQL> SELECT
      2     doc_id,
      3     ver,
      4     updated_by,
      5     updated_timestamp,
      6     max_ver
      7  FROM
      8     (
      9     SELECT
    10             doc_id,
    11             ver,
    12             updated_by,
    13             updated_timestamp,
    14             MAX(ver) OVER(PARTITION BY doc_id) max_ver
    15     FROM
    16             dt_test_docs
    17     )
    18  WHERE
    19     max_ver = ver
    20  /
    DOC_ID            VER UPDATED_BY UPDATED_TIMESTAMP                                                      MAX_VER
    ABC                 4 user3      06-SEP-06 05.31.19.242000 PM                                                 4
    DEF                 4 user1      06-SEP-06 05.31.19.304000 PM                                                 4

  • Wwctx_api.get_user in Dynamic Page?

    Can API calls be made from select statements within the <ORACLE></ORACLE> tags in Dynamic Pages? The following query should list courses that someone has signed up for but the query cannot be saved within the Dynamic Page:
    <ORACLE>
    select course_name
    from course
    where user_id = wwctx_api.get_user
    </ORACLE>
    Regards,
    Jay
    Jay Mason
    Director, Oracle Web Applications Development
    Effective Shareholder Solutions, Inc.

    Jay,
    Just prefix the function with "PORTAL30" (or the name of the schema where Portal is installed, if not PORTAL30).
    <ORACLE>
    select course_name
    from course
    where user_id = PORTAL30.wwctx_api.get_user
    </ORACLE>
    null

  • Lookup column only return 201 items from external list

    I have a BCS external list which contains about 700 items. I already set the BCS Throttle limit to 50000 items (default) and 1000000 (max). I can view all 700 items in the external list.
    I created a regular lookup column in a custom list to lookup the external list. When I click the drop-down, it only returns the first 201 items with a red message "Warning: Too many results have
    been returned. This result set may be incomplete or truncated.". I need all items available for selection so set up a filer will not work for me.
    I just wonder if there is any work around for the issue. Many thanks.

    This is unfortunately the default behavior with external content type. The limit is set at 201.  You can however avoid this by setting appropriate filters to limit the number of results to less than 200. The user can use wildcards in their filter to
    more fine tune the results returned.
    Read more on how to set filters on external content type here:
    http://blogs.msdn.com/b/bcs/archive/2010/05/05/why-it-s-important-to-define-filters-for-a-good-picking-experience.aspx
    Thanks, Ransher Singh, MCP, MCTS | Click Vote As Helpful if you think that post is helpful in responding your question click Mark As Answer, if you think that this is your answer for your question.

  • WWCTX_API.GET_USER

    I created a custom folder and typed following sql in that:
    SELECT WWCTX_API.GET_USER from dual
    there was no problem in creating this folder.
    When i create a worksheet in plus and while running a query, its giving following errors
    ORA-14551: cannot perform a DML operation inside a query.
    ORA-06512: at "PORTAL.WWCTX_SSO",line 2954
    ORA-06512: at "PORTAL.WWCTX_SSO",line 3483
    ORA-06512: at "PORTAL.WWCTX_SSO",line 1735
    ORA-06512: at "PORTAL.WWCTX_SSO",line 2954
    ORA-06510: at PL/SQL: unhandeled user-defined exception
    ORA-06512: at
    Actually one of my query is based on SSO user id.
    When i use this "SELECT WWCTX_API.GET_USER from dual;" on SQL prompt. Its doesn't give any error.
    I need to use this WWCTX_API.GET_USER in my query. Any idea why its giving error in discoverer plus?
    Thanks

    Questions similar to yours have been answered earlier in the forum in these threads:
    http://forums.oracle.com/forums/message.jsp?id=456180
    http://forums.oracle.com/forums/message.jsp?id=628583
    You can search the forums by entering your search criteria in the text field in the upper right corner of the OTN Discussion Forum Page.

Maybe you are looking for

  • Images uploaded in Shared Components not displaying

    We recently installed version 4.2.1 on a new dedicated server. The entire setup went through without error. The default images found in apex (/i/apex/builder/ etc.) are all visible. But when we upload any image through Shared Components > Images do n

  • Bridge crashes with camera raw 4.4.1 installed, OK with 4.0

    When I use Bridge with camera raw plugin 4.4.1 installed to navigate to a folder with at least one raw image shot with Sony Alpha 100, it consistently crashes. I can open the same image using Photoshop and Camera raw without a problem, so the image i

  • Javascript error when adding Flash movie to DWCS3

    When I try to add a Flash movie to a page in DW CS3, I get the following message: When executing onClick Options.htm, the following Javascritp Error(s) occurred: At line 55 of the file "I:\Program FIles\Adobe\Adobe Dreamweaver CS3\Configuration|Comma

  • Need help with tank wars

    I am a beginner trying to create a recursive statement in setting my location coordinates. Someones help would greatly be appreciated. action do_your_thing (sensors s) {      action Move = new action(); if (s.turn == 1) { Move.the_move = Setups.moves

  • Does Import/Export Utility check for Block corruption?

    Hi All, Just a quick question I have is does Import/Export Utiligy check for any block corruption while importing or exporting? If yes then does it do automatically or we have do set some parameter explicitly. I am using oracel version 9.2.0.6. Thx i