How to set an Application Item from PL/SQL

I am attempting to set an Application Item
After login to my app, I want to retrieve a row from my SETTINGS table and populate some Application Items with the settings information so that I can
display some of that settings information on every page.
Just to start, I created one Application Item named F106_YEAR
I then created a Shared Components Application Process which executes on New Session: After Authentication
I created this process as an Anynomous PL/SQL block.
declare
aucyr varchar(4);
begin
select year into auctyr
from settings;
:F106_YEAR := aucyr;
end;
I've tried a couple of other Syntax tricks attempting to reference the Application Item F106_YEAR from within PL/SQL (like V('F106_YEAR') but nothing seems to be working.
I'm sure that I am missing something simple. Can someone tell me how to set an Application Item from PL/SQL?
Thanks in advance.

I'm still doing something wrong because this is not working for me.
I've tried both of the following versions as an Application Process set to run on New Session after Authentication:
declare
auction_year varchar(4);
begin
select year into auction_year
from PBUUC.SETTINGS where rownum < 2;
:F106_AUCTION_YEAR:=auction_year;
end;
and I also tried:
declare
auction_year varchar(4);
begin
select year into auction_year
from PBUUC.SETTINGS where rownum < 2;
APEX_UTIL.SET_SESSION_STATE (p_name, p_value);
end;
F106_YEAR is a global Item (shared components).
The select statement works just fine in SQL*PLUS so I know that it is correct.
If I run the debugger and log into the application, here is the output. Shouldn't I see my Application Process get called if it is set to run on New Session after Validation?
My Application process is named RETRIEVE_AUCTION_SETTINGS
0.01: A C C E P T: Request="P101_PASSWORD"
0.01: Metadata: Fetch application definition and shortcuts
0.01: alter session set nls_language="AMERICAN"
0.01: alter session set nls_territory="AMERICA"
0.01: ...NLS: Set Decimal separator="."
0.01: ...NLS: Set NLS Group separator=","
0.01: ...NLS: Set date format="DD-MON-RR"
0.01: ...Setting session time_zone to -04:00
0.01: NLS: wwv_flow.g_flow_language_derived_from=0: wwv_flow.g_browser_language=en-us
0.01: Fetch session state from database
0.02: ...Check session 695371898690095 owner
0.02: ...Check for session expiration:
0.02: ...Metadata: Fetch Page, Computation, Process, and Branch
0.02: Session: Fetch session header information
0.02: ...Metadata: Fetch page attributes for application 106, page 101
0.03: ...Validate item page affinity.
0.03: ...Validate hidden_protected items.
0.03: ...Check authorization security schemes
0.03: Session State: Save form items and p_arg_values
0.03: ...Session State: Save "P101_USERNAME" - saving same value: "jps"
0.03: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
0.03: Branch point: BEFORE_COMPUTATION
0.03: Computation point: AFTER_SUBMIT
0.03: Tabs: Perform Branching for Tab Requests
0.03: Branch point: BEFORE_VALIDATION
0.03: Perform validations:
0.03: Branch point: BEFORE_PROCESSING
0.03: Processing point: AFTER_SUBMIT
0.03: ...Process "Set Username Cookie": PLSQL (AFTER_SUBMIT) begin owa_util.mime_header('text/html', FALSE); owa_cookie.send( name=>'LOGIN_USERNAME_COOKIE', value=>lower(:P101_USERNAME)); exception when others then null; end;
0.04: ...Process "Login": PLSQL (AFTER_SUBMIT) wwv_flow_custom_auth_std.login( P_UNAME => :P101_USERNAME, P_PASSWORD => :P101_PASSWORD, P_SESSION_ID => v('APP_SESSION'), P_FLOW_PAGE => :APP_ID||':1' );
0.06: ...Process "Clear Page(s) Cache": CLEAR_CACHE_FOR_PAGES (AFTER_SUBMIT) 101
0.06: Nulling cache for application "106" page: 101
0.00:
0.00: S H O W: application="106" page="1" workspace="" request="" session="695371898690095"
0.01: alter session set nls_language="AMERICAN"
0.01: alter session set nls_territory="AMERICA"
0.01: ...NLS: Set Decimal separator="."
0.01: ...NLS: Set NLS Group separator=","
0.01: ...NLS: Set date format="DD-MON-RR"
0.01: ...Setting session time_zone to -04:00
0.01: NLS: wwv_flow.g_flow_language_derived_from=0: wwv_flow.g_browser_language=en-us
0.01: Application 106, Authentication: CUSTOM2, Page Template: 2904114531488186
0.01: ...Session ID 695371898690095 can be used
0.01: ...Application session: 695371898690095, user=JPS
0.01: ...Determine if user "JPS" workspace "1040027630222986" can develop application "106" in workspace "1040027630222986"
0.01: ...Check for session expiration:
0.01: Session: Fetch session header information
0.01: ...Metadata: Fetch page attributes for application 106, page 1
0.01: Fetch session state from database
0.02: Branch point: BEFORE_HEADER
0.02: Fetch application meta data
0.02: Computation point: BEFORE_HEADER
0.02: Processing point: BEFORE_HEADER
0.03: Show page template header
0.03: Computation point: AFTER_HEADER
0.03: Processing point: AFTER_HEADER     
0.04: Computation point: BEFORE_BOX_BODY
0.04: Processing point: BEFORE_BOX_BODY
0.04: Region: Auction_Title F106_AUCTION_YEAR

Similar Messages

  • How to set an application item when report column link is clicked?

    I am trying to set the short name of a bread crumb entry when I drill into a detail from an interactive report page.
    The master report has a column link with target = detail - "page in this application"
    I can pass page items through the URL and they are set on the target page.
    How can I set an application item before the target page is called?
    Is there a way to set a process before the link is followed?

    Kenneth,
    I'm not totally sure that I understood the question but, it soounds like you want to set the value of some page items on the page that is opened when you click a link on a column in the master window. Is this right?
    If so, you can achieve what you want by creating hidden page item(s) on the target page. In the master page, on which every column provides the link, go into Report Attributes, click on the link column and scroll down to the section labeled "Column Link" Within this section, set the link text to the current column value, e.g. #MASTER_REPORT_COLUMN_NAME_HERE#. Set the target to "Page in this Application" and pick the page number for the target window.
    Underneath this you will see a section to set set the value for page items. If you click the flashlight, you can search for the hidden page item that you created above. Use the same value to set it as you did the link text, i.e. #MASTER_REPORT_COLUMN_NAME_HERE#. Do this and let APEX take care of passing the values on the URL.
    On the child page, just set whatever control you want to dynamically pick up the value from the hidden field. For example, if you hidden field where named P4_CLEARER_NAME. You could set the title attribute to "Contact Information for &P4_CLEARER_NAME."
    You need the preceeding "&" and terminating "." around the name of you hidden page item to do this.
    -Joe

  • Assign Application item from PL/SQL package-not possible? Right?

    I have to be sure about tittle statement...
    If is possible please some lead where to look for that.
    THX!

    If I have in "Aplication items" item, in plsql is there any way to change it's value.
    FSP_SET_PREFERENCE is making some things for named user (AFAIK)...and I want to change some vars on session based ... but not in WEB but in PLSQL enviroment .
    Hope now is clear...
    THX for replies
    Message was edited by:
    Funky

  • Set application item from javascript?

    Hi!
    Is it possible to set an APPLICATION ITEM from javascript? If so can some one please point me to the thread, or a FAQ or an example, etc?
    Thanks!
    Dave Venus

    dvenus1,
    Sure. In the script below I check variables and populate based on what I find...
    <script language="JavaScript" type="text/javascript">
    function Populate_fld()
    var formVehicle = document.getElementById('P9_HIDE_VEHICLE').value;
    var formState = document.getElementById('P9_HIDE_STATE').value;
    var formTag = document.getElementById('P9_HIDE_TAG').value;
    var formName = document.getElementById('P9_HIDE_NAME').value;
    document.getElementById("P9_VEHICLE").value = formVehicle;
    document.getElementById("P9_TAG").value = formTag;
    document.getElementById("P9_STATE").value = formState;
    document.getElementById("P9_VISITOR_NAME").value = formName;
    if (formState = " ")
    document.getElementById("P9_STATE").value = "FL";
    </script>
    Keep Smiling,
    Bob R

  • Reference application item from page template

    Hi friends,
    How can refere to application item from page template (i.e. one level tab).
    set or get value from application item.
    thank you

    Alaa,
    If the item name is X put &X. in the template. Don't forget to use upper case and provide the trailing period.
    set or get value from application item.
    That is not a complete sentence, please clarify.
    Scott

  • How to set a page item to either of two sources?

    Hello Folks,
    I would like some advice with the following:
    On P1 there is a text field, say p1_text. The users enters a value into p1_text. This is validated.
    If the p1_text value validates OK, and the next button is pressed, there is a branch to page 2, which has a sql query page item named p2_dest which should use :p1_text in a where clause.
    If the p1_text value does not validate OK, the user is then presented with a Select List named p1_select (p1_text is now hidden). When the next button is pressed, there is a branch to page 2, and the sql query page item, p2_dest should now use :p1_select in a where clause (instead of :p1_text).
    I have the validation and presentation of either p1_text or p1_select working OK, but would really appreciate suggestions on how to set the one item on page 2 with either of the page 1 items when the branching occurs.
    Thanks
    KIM

    I used pl/sql in a page process on P2 to implement this logic to set a P2 item. I removed the setting of items from the calling page branch process.
    Cheers
    KIM

  • ERPI: how to set up drill through from Planning to EBS

    Hi,
    When you guys know how to set up drill through from Planning to EBS through ERPI ??
    I encountered the following message when I tried to drill :
    no drill through reports found at this location
    I think I didn't set up the drill through functionality properly.
    Regards,
    Eddy

    Can you check the log file for any errors? Also, check if the drill regions are created in the application. You can navigate to process details in ERPI and select the show log link for the corresponding process id. That should indicate if the drill regions were created on the target.
    Thanks,
    Bala

  • How can i delete purchased items from the cloud in iTunes

    how can i delete purchased items from the cloud in iTunes

    I had this problem as well. You can't delete them but you can hide them by swiping across from the cloud to. The other side then pressing hide

  • How to delete a line item from the sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi
    U can do this in two ways one u can short close the order by entering Reason for rejection in VA02 at header level and if yr order is multiple line item order u can enter the reason for rejection in any of the line item which u don't want to deliver.
    This is called short close ( as the qty is not delivered fully).
    Thx.

  • How to delete the line item from a sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

  • How to refer an application item in a java script ?

    Hi Friends,
    I have a simple java script for disabling an item as below :
    <script language="JavaScript1.1" type="text/javascript">
        function disFormItems(item1)
          if ($x(item1).value != "")
              disItem = document.getElementById(item1);
                    disItem.style.background = 'beige';
                    disItem.readOnly = true;
    </script>I have an application level item G_BUTTON_FLAG. Based on the value coming into this application item I want to disable the item.
    So I went and changed the script as below :
    <script language="JavaScript1.1" type="text/javascript">
        function disFormItems(item1)
          if ($x(item1).value != "" && $x('G_BUTTON_FLAG').value == "EDIT")
              disItem = document.getElementById(item1);
                    disItem.style.background = 'beige';
                    disItem.readOnly = true;
    </script>Can any one please tell me what am I doing wrong here ?
    Thanks,
    Raj.

    Hi Teku,
    Javascript can only see what is actually on the page - this has nothing to do with Apex, it's just what javascript is designed to do.
    There are two things you can do:
    1 - Add a hidden item to your page and set the application item as its source and then refer to that hidden item instead
    2 - Use Ajax to get the value
    I'd go with the first one as it's the simplest solution.
    Andy

  • How to set background ChoiceBox item color to ChoiceBox with css?

    How to set background ChoiceBox item color to ChoiceBox with css?
    I need to change items list backgound color.
    I tried with following code, but it doesnt helps:
    .choice-box .context-menu {
      -fx-backgound-color: red;
    .choice-box .menu-item{
      -fx-background-color: red;

    In Java 8, either of your selectors should work.
    In Java 7 (JavaFX 2.2), you need the following workaround:
    #choice-box-menu-item {
         -fx-background-color: red ;

  • How can I take an item from one image and move it to another image?

    How can I take an item from one image and add it to another image, and rotate it to fit?

    Carefully select the objects of interest in one image and then copy, scale and position them into the other image. Then touch up the composite.
    Have to Love Photoshop for Retouching Images!

  • How do I transfer purchased items from my I-Pad to my I-Tunes library

    how do I transfer purchased items from my I-Pad to my I-Tunes library?

    iTunes Store: Transferring purchases from your iOS device or iPod to a computer

  • How do I remove Completed items from the Completed Reminders List? The list is growing too long.

    How do I delete Completed items from the Completed Reminders List? The list is growing too long.

    The little box, next to the reminder on the reminder page.  Touch it, and it puts a check mark there, i suppose to mean completed.  Leave the app.  When you go back, the items are gone.  ( at least on mine...)

Maybe you are looking for

  • Video chatting with windows vista

    is it possible to video chat with window or windows vista? whenever i try t chat with someone who also has a camera it says communication error. does anyone have any answers or advice?

  • Expdp fails with error ORA-39006: internal error writing on a windows share

    Hi! I need to get the following configuration working: Linux Server (CentOS 5 32 bits) with Oracle 11.2.0.1.0 Windows Server 2003 SP2 32 bits. On the windows server I have created a user called oracle, who is member of oinstall and dba groups. (On Li

  • Trying to copy names of folders AND sizes from Finder.

    When I copy paste into workbook only names show up. Is there a way I can have the names and the sizes? It seems like a simple tas but I can't figure it out. I downloaded and used Print Window but the sizes of each folder are off. Anyone have any idea

  • How to use @variable(bouser) in Universe to get BOE userid in Xcelsius

    Dear Expert, I have request that need to display BOE userid to displayed in Dashboard using Xcelsius, after searching in Internet, i found that it can be done by using @variable(bouser) in an object in the Universe, and use the object in Qaaws, but i

  • Proficiency Scale - direction

    Hi Experts, I need your advise, the company I work for is not using the direction of proficiencies in the scales as recommended by SAP, i.e. 1 - Poor and 5 Excellent; but is using them the other way round; 1 - Excellent and 5 - Poor. I know SAP recom