Is there a problem with APEX Application Processes and VPD?

I have a table that has a policy function. When I select from the table straight from the page it seems to be only returning the appropriate rows for the user.
But, when I select from the same table using an application process (On-Demand), PL/SQL Block.
BEGIN
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p ('Cache-Control: no-cache');
HTP.p ('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn ('<select>');
FOR c IN (SELECT '1' o,
name || ' (' || school || ')' d,
pk_id r
FROM sch_base
WHERE pk_id = nvl(:REFRESH_LOV_PK_ID,'null')
UNION
SELECT '2' o,
'%' d,
'%null%' r
FROM dual
UNION
SELECT '3' o,
name || ' (' || school || ')' d,
pk_id r
FROM sch_base
WHERE pk_id <> nvl(:REFRESH_LOV_PK_ID,'null')
ORDER BY 1,2)
LOOP
HTP.prn ('<option value="' || c.r || '">' ||
c.d || '</option>');
END LOOP;
HTP.prn ('</select>');
END;
It returns all rows in the table.

This is the policy on my table:
begin
dbms_rls.add_policy(
object_schema => 'SIS_EXPRESS',
object_name => 'SCH_BASE',
policy_name => 'SCH_BASE Policy',
function_schema => 'SIS_EXPRESS',
policy_function => 'VPD_SCH_BASE',
statement_types => 'select');
end;
I have a function VPD_SCH_BASE which set the where condition for the SCH_BASE table.
It works for a simple list values select, but not when this Application Process is run.
BEGIN
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p ('Cache-Control: no-cache');
HTP.p ('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn ('<select>');
FOR c IN (SELECT '1' o,
name || ' (' || school || ')' d,
pk_id r
FROM sch_base
WHERE pk_id = nvl(:REFRESH_LOV_PK_ID,'null')
UNION
SELECT '2' o,
'%' d,
'%null%' r
FROM dual
UNION
SELECT '3' o,
name || ' (' || school || ')' d,
pk_id r
FROM sch_base
WHERE pk_id <> nvl(:REFRESH_LOV_PK_ID,'null')
ORDER BY 1,2)
LOOP
HTP.prn ('<option value="' || c.r || '">' ||
c.d || '</option>');
END LOOP;
HTP.prn ('</select>');
END;

Similar Messages

  • I'm having a problem with the application Dropbox and I want to uninstall it. In finder it does not allow me to move it to trash telling me the dopbox application is open. How do I close it? when it shows up nowhere as an open application?

    I'm having a problem with the application Dropbox and I want to uninstall it. In finder it does not allow me to move it to trash telling me the dopbox application is open. How do I close it? when it shows up nowhere as an open application?

    Is there a DropBox icon up in the menubar you can click on & see quit DropBox?
    https://www.dropbox.com/help/41

  • Is there a problem with ios 5.1 and gmail?  No email has downloaded since 7-18.

    Is there a problem with ios 5.1 and gmail?  No email has downloaded since 7-18.

    No. Try deleting the account and re-adding it.

  • Is there a problem with Allen Bradley PLC and web server export options

    It says this object will not run in a client version. I have a development version and a client version. Maybe I'm not understanding the error message. Lookout 5.0

    The process you upload to a web server needs to be a poor client process. It means you have to create a client process without the PLC driver and a server process with the PLC driver. You will just upload the client process and the server process will stay on the Lookout Server machine.
    There are several links on the support site those explain the prefered client-server architecture to choose for a Lookout application.
    Building a Sample Server-Client System in Lookout
    Converting a Lookout Server Process Into a Client
    ://ae.natinst.com/operations/ae/public.nsf/fca7838c4500dc10862567a100753500/4c13547ceb6354a886256b80...
    Hope this is a good starting point for your Lookout application design.
    Roland

  • Is there a problem with USB Memory Sticks and OSX?

    This may not be the correct forum for this question but I don't know where else to ask!
    I am having problems with a 64GB USB Memory Stick. Acrobat Reader can't read a pdf file on the memory stick but no problem from the hard drive. Acrobat Reader won't work from the memory stick. Music files (aif) won't play from the memory stick.
    The memory stick came formatted for MS-DOS but I re-formatted it to MAC-OS Extended. I can write files to it but they don't seem to work from there. Is there some incompatability with OSX that I am not aware of? I would welcome some advice.

    MAke sure the drive is inserted and mounted, then launch Terminal from /Applications/Utilities.  Type:
    mount
    and hit Enter.
    One of the lines returned will contain the words, "/Volumes/<name of your flash drive>".  Copy that whole line and paste it here so we can see what's up.

  • 7/7/13 Is there a problem with I cloud today and yesterday? I am unable to download e-mail and other issues.?

    Discussion Question:  7/7/13 Is there an ongoing problem with ICloud on 7-6-13- & 7-7-13?   I am unable to download e-mail.  Thanks for your help.

    Thanks for responding.  I must sign off now.

  • Is there a problem with Apple on iTune and Appstore?

    It doesn't seem iTune and Appstore loading properly from my Macbook Air and Pro (both are on 10.9.2).

    Thanks Linc for asking. I'd like to withdraw this question though it's interesting to share what I found...
    The issue was somehow the connection between my wireless ADSL router and apple app store, itune. For example, the app store could be loaded but some apps missing pictures (similar to iTunes loaded) on my macbook air,pro and windows laptop. When I tried to download those apps with missing pictures (not fully loaded), said "unknown errors". All other internect connects seemed running as usual. That was why I thought it might be problems with Apple's server side etc. 
    I restarted the router and then problems resolved. App store and iTune runs as normal...wondering if Apple would have monitored any abnormal connections from end user and then blocks those?

  • Is there a problem with OS 10.4 and Epson Work Force printers?

    I can't find a driver for the Epson WF-3520 All In One printer.  Help!

    Hi Srubby, did you try this?
    http://www.epson.com/cgi-bin/Store/support/supDetail.jsp?oid=209706&BV_UseBVCook ie=yes&infoType=Downloads&platform=OSF_M_X4
    Common Updater  v9.0
    06/21/11 32.8 MB epson14284.dmg Download
    Fax Utility v1.51
    11/26/12 9.8 MB epson15062.dmg Download
    Description: This file contains the Epson Fax Utility v1.51.
    This utility allows the transmitting of data such as documents, drawings, and tables created using a word processing or spreadsheet application directly by fax, without printing.
    Installation instructions:
    Download the file.
    Double-click the downloaded file to create a disk image on your desktop.
    Open the disk image.
    Double-click the installer icon to begin the installation.
    Compatible Systems: Mac OS X (v10.8.x), Mac OS X (v10.7.x), Mac OS X (v10.6.x), Mac OS X (v10.4.11 - v10.5.8) Note: This file applies to numerous Epson products and may be compatible with operating systems that your model is not.
    Download Navigator v1.50
    10/30/12 1.1 MB epson14850.dmg Download

  • While installing adobe creative cloud , getting the following error msg " There seems to be a problem with the download process. Error code:201"

    while installing adobe creative cloud , getting the following error msg " There seems to be a problem with the download process. Error code:201"

    Creative Cloud Help / Error downloading Creative Cloud applications
    http://helpx.adobe.com/creative-cloud/kb/error-downloading-cc-apps.html

  • When downloading from a Sony minidisc video camera, the picture is downloading but without sound.  Previously, it had downloaded successfully both sound and picture.  I have subsequently upgraded to Lion X (10.7.4).  Is there some problem with the driver?

    When downloading from a Sony minidisc video camera, the picture is downloading but without sound.  Previously, it had downloaded successfully both sound and picture.  I have subsequently upgraded to Lion X (10.7.4).  Is there some problem with the upgrade which is affecting the transfer?  Is there a way of resolving this?

    When you have kernel panics, the pertinent information is in the panic report.
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    In the Console window, select
              DIAGNOSTIC AND USAGE INFORMATION ▹ System Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar.
    There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of reports. A panic report has a name that begins with "Kernel" and ends in ".panic". Select the most recent one. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    If you don't see any reports listed, but you know there was a panic, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.

  • My iPod says there's a problem with my last purchase and every time I try to look at my history to clear the problem it says there no connection to ITunes

    When I log into my acc it ammediatly says there's a problem with my last purchase and to go to my purchase history to clear it.  When I hit continue its suppose to take me to the history but it just loads then says cannot connect

    the itunes says that it knows that there isan ipod there, but it doesnt recognize it. I have reset the ipod, restarted my computer, and reinstalled itunes.
    Doublechecking. Have you tried a complete uninstall of both iTunes and all the other related software components (Apple Mobile Device Support, Apple Application Support, etc ...) and then a reinstall? If not, try the instructions from the following document:
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8

  • I think theres a problem with my ram someone help me please

    I have a ibook g4 mid 2005 model and the hard drive says zero kb free i deleted half of my applications i dont need and it still says zero kb free. is there a problem with my ram? or is there a mac virus or somthing? also when i opened a game after a while it said force quit please and delete stuff becuase your hard drive is full. someone help me please!

    It does not sound like a RAM issue but a disk problem. You might just need to empty the trash so that the deleted space is marked free. Otherwise it is best to boot from an install CD, run Disk Utility, and do a "Repair Disk"

  • I want to upgrade from Tiger to Snow Leopard on my 2008 MacPro. How do I avoid problems with the upgrade process?

    I want to upgrade from Tiger to Snow Leopard on my 2008 MacPro. How do I avoid problems with the upgrade process?

    #1 Do a complete bootable backup of your drive before upgrading. That way should anything happen you can revert back to the start and try again.
    Make sure you meet Snow Leopard 10.6 Technical Requirements - http://support.apple.com/kb/SP575
    You might also want to make sure you don't have software issues with SL:
    A Mac OS X 10.6 Snow Leopard Application Compatibility List - http://snowleopard.wikidot.com/

  • Email settings problem - your device encountered a problem with this application's server

    Hi, 
    I'm getting the following message 
    "your device encountered a problem with this application's server" when I try to add an email in Email settings. This problem is occurring since 15-NOV-2010. I'm using O2 service provider. i've called them and reported this problem. O2 service provider did all possible troubleshooting and they adviced everything is ok on their side. They don't know why am I getting this message. 
    This is really frustrating and not able to add an email or edit my existing email settings. I did reboot my handheld more than 10 times but no luck. Please can anyone help me to sort this problem out. PLEASE HELP
    Regards,
    Vimal

    Hello there,
    I am having the same problem since last 2 days. I have a BB curve 8900 with O2. I called them up today morning. They said that the problem is at their end and some of the customers are getting affected. Luckly, I still can access the setup using webclient.
    Hopefuly they will resolve this issue soon.
    Cheers,
    G

  • Problem with Apex: wwv_flow.accept

    Hello!
    I've developped an application which worked perfect since nearly one year. Now - suddenly - when changing data in an tabular form and pressing the submit button this page appears:
    <h1>Not found</h1>
    The requested URL /apex/wwv_flow.accept was not found on this server
    <br>
    From time to time it seems to work again, but then - after changing some data again... it appears again. Turning Debugging on has no effect. Do someone know or give me some advice what went wrong? Thank you Johann Message was edited by: horvatj
    I aksed this topic in the APEX Forum - see thread:
    Problem with Apex: wwv_flow.accept
    Scott answered:
    Johann - Check the Apache error log for more details.
    Okay, but XE doesn't use Apache!?
    How can I access the logfiles?
    Where can I find them?
    Thank you
    Johann

    If you believe it or not, I solved without any logfile...
    The problem was some kind of corrupt data.
    After correcting this everything works fine again. I really don't know why this not found error occurs, but ;-)
    Thanks Johann

Maybe you are looking for

  • How to determine the ROWNUM in a Master Detail Form

    Hello, I am working in a Master Detail Form with Orders and Order Items Information; and I created a process that allows the users to select a Product ID on a tabular form, and the next column is populated automatically with the Product Description.

  • My iMac will not boot up.  it brings up a black screen with a cursor

    all of a sudden my imac will not boot up.  it brings up the grey page with the apple, then instead of going to the login, it goes to a blank black page.  The cursor moves with the mouse, but that is it

  • SQL query for custom alert view

    I have created a custom alert view and scoped to show alerts related to group of servers. Alert view Criteria: Resolution State - New, Severity - Warning and Critical, Group - "Group 1" I am trying to query the Operations Manager database to show the

  • Export from running swf to eps?

    I'd like to export, say, the current frame being displayed in Flash Player (or previewing in the authoring environment) to eps, ultimately bound for Illustrator. I know it can be done; Joshua Davis boasts about it in one of Adobe's showcase panels. E

  • Idoc Order05 Mapping into SRM PO XML Structure

    Hello All, I need to map Idoc order05 from ERP system into SAP provided SRM XML Structure. Anyone has done this sort of mapping before. Let me know the details as XML has got some 4800 fields and Idoc has some 800 fields and SRM XML seems to be super