Using Application Items. Declaring Variables

Bug tracker sample application is a great example and has some great advanced functions. I am trying to better understand how this application works.
One question that comes up is where are declaring :G_STATUS & :G_PRIORITY variables?
See Page 2 > Edit Page Process > Name: Load Data. Look for G_STATUS G_PRIORITY
I see that most G_ (global variables) are set as Application Items, but I cannot find these two anywhere else. I even did an export of components and application. I cannot find these two set and declared anywhere.
Please let me know how this works.
Who is sathish and sbkenned who worked on this application.Are they on the forum?
I believe if there was a manual or training material that creates and walks you through something like this application, that would very helpful to get new developers up to speed.
Thanks in advance,
Konstantine

Konstantine,
I am sbkenned but sathish is the
developer of this app (I review and 'tweak' all the
packaged apps and then write some too). I have
emailed Sathish and asked him to respond to your
question. For a manual on how to create one of
these, we can't write one per app because we would
never have time to work on the base APEX product. We
do have the Issue Tracker tutorial (in our Advanced
Tutorials) that does walk through creating a complete
app from conceptualization to completion and there is
a resulting app you can download. It is a bit out of
date (but still useful). We are working on upgrading
both the doc and app right now to 3.1 standards and
will release it again in the next 1-2 months.
-- SharonSharon,
Just a quick question.. DOo you know the full name of the other developer for the Bugtracker application? I used to work with an APEX developer/DBA named Sathish back in Seattle, Wa.. We used a home grown bug tracking application there, maybe it is the same application??
Thank you,
Tony Miller
Webster, Texas

Similar Messages

  • How to use application item in the page template

    How to use application item in the page template.
    Thanks,
    rajendra

    Hi,
    You can refer application item value in template like &MY_ITEM. (note period at end)
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_sub.htm
    Regards,
    Jari

  • Using value of application item in javascript

    Hello All,
    Apex 3.1
    I have a javascript that calls an application process, please see below. In the application process I have logic to set/change the value of an application item. Later in the javascript I need to set a page item to the value of the application item which was set in the application process. Any alerts that I post during the javascript show this value as blank, even though a similar HTP.prn in the application process displays the value!. After the script completes the correct value of the application item is in session state . Can someone explain this timing issue to me? Why can't I get the value of an application item in the javascript when the application process is called from the javascript?
    Is there a simple workaround here for me to get this value?
    <script>
    function f_ValidateLinkLine(pThis) {
       // The row in the table
       var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
       // is Link Line really a number? 
       if ( isNaN(html_GetElement('f20_'+vRow).value)) {
            if (html_GetElement('f20_'+vRow).value.length > 0) {
            alert('Link Line is an invalid number - '+html_GetElement('f20_'+vRow).value);
            html_GetElement('f20_'+vRow).value = '';
       } else { 
           if ( ! isNaN( parseFloat(html_GetElement('f20_'+vRow).value) ) ) {
       var link_line = parseInt(html_GetElement('f20_'+vRow).value);
       if (html_GetElement('f20_'+vRow).value.length > 0) {
          var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateLinkLine',0);
          get.add('F101_LINK_LINE',html_GetElement('f20_'+vRow).value);
          get.add('F101_INVENTORY_ITEM_ID',html_GetElement('inventory_item_id_'+Number(link_line)).value);
          get.add('F101_QUOTE_LINE_LINK_ID',html_GetElement('f01_'+spacer+link_line).value);
          get.add('F101_QUOTE_LINE_ID',html_GetElement('f01_'+vRow).value);
          get.add('F101_QUOTE_NUMBER',html_GetElement('f19_'+vRow).value);
          gReturn = get.get();
       // The application process can sometimes change the value of F101_QUOTE_LINE_ID
      //  and I need to set f37 to this value when this happens
        html_GetElement('f37_'+vRow).value =('&F101_QUOTE_LINE_ID.');  //< -- This does not work, the applicaiton item is blank!
          if (gReturn) {
           alert(gReturn);
          if(gReturn) {
           html_GetElement('f20_'+vRow).value = '';
           html_GetElement('f37_'+vRow).value = '';
       }  //End Check Length
      } else {
      html_GetElement('f37_'+vRow).value = '';
      } // is Link Line a number?   
    } // End If  
    } // End ValidateLinkLine
    </script>Edited by: blue72TA on Aug 16, 2011 11:39 AM
    Edited by: blue72TA on Aug 16, 2011 11:41 AM
    Edited by: blue72TA on Aug 16, 2011 11:41 AM

    Hi,
    When you use application item in JavaScript like you do, string &F101_QUOTE_LINE_ID. is substituted by item value from session state.
    Changes to that item value when you call On Demand process do not affect to page.
    Lets take example,
    You app item F101_QUOTE_LINE_ID value is e.g. XX in session state.
    You run page and see page source it looks like this
    html_GetElement('f37_'+vRow).value =('XX');Kind you have hard code value to JavaScript.
    Nothing will change that unless you refresh page.
    You need return value from On Demand process.
    To set value code could look like then
    html_GetElement('f37_'+vRow).value = gReturn;Regards,
    Jari

  • AJAX - Application Item

    Hello,
    What is the impact of using Application Items in a multi user environment. For example, as used by Denes Kubicek (http://htmldb.oracle.com/pls/otn/f?p=31517:106:6685963539389519:::RP,::). Are these global variables? If so, what happens if one user overwrites this while processing another users AJAX request?
    Thanks!
    Rose

    There is no impact of using an Application Item (or any other item), as the AJAX call is specific to the users current session. There is no problem with many users doing the operation at the same time.

  • Application Items - is there a way to find all pages containing an item?

    Hello,
    I'm taking over support on an APEX application which uses application items. There's no documentation on design so I'm having to go through the app manually to understand it. Is there a way to see which pages a given app item has been used on? I don't want to trawl through each page manually...
    Steve

    Hello
    You can also access the apex_application views from sqlplus or your favorite GUI.
    Connect with the schema owner of a schema that belongs to the apex workspace your application is in.
    Then you can build your own select statements
    For example
    select *
    from   apex_application_page_items p_item
    ,      apex_application_items      app_item
    where  p_item.application_id = app_item.application_id
    and    p_item.item_source = app_item.item_nameWould give you all the page items that use a application item as source.
    Pretty much everything is accessible through these views such as source of the processes or conditions for display.
    Have fun :)
    Nicolette

  • Give some examples For Application items

    How to use application items and where used?

    Some examples
    - date format -> global settings
    - preferred name -> displayed in lieu of username
    - file locations -> parameterise templates
    - application context -> store selected account/job/task/item/id, one referenced used across many pages
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/bldapp_item_app.htm#BCEHFDDJ
    Scott

  • Application Item Not Working as Bind Variable in Region Source

    I've created an application variable - APP_AC_CODE - a value for which - PA1 - I set as part of the column link on page A that branches to page B.
    I use APP_AC_CODE as part of a region title on page B - &APP_AC_CODE. Parameters - which evaluates successfully to 'PA1 Parameters'.
    However when I try to use APP_AC_CODE on the same page as part of the SQL query that drives the report for that region it fails to retrieve any records.
    If I set the region source to:
    SELECT idi FROM v_parameters WHERE aircraft_code = :APP_AC_CODE ;
    then it fails but if I explicitly state the where clause:
    SELECT idi FROM v_parameters WHERE aircraft_code = 'PA1' ;
    then it works just fine and retrieves the records as expected.
    If I check the session state then the right value is assigned to APP_AC_CODE; if I check debug then it shows the right value - binding: ":APP_AC_CODE"="APP_AC_CODE" value="PA1". Also, it displays fine as a substitution string.
    I'm very confused. I'll be very grateful if someone can shed a little light. I expect I'm doing something stupid - new user and all that - but I haven't got a clue what that is.

    Thanks for the reply Scott, but unfortunately I can't upload the app for business reasons. I appreciate that might make it impossible for you to diagnose the problem.
    I don't know if I'm making progress with the problem but I've tried adding a hidden page item, setting that value from page A and using it from page B with the same results. Check the session state, the debug messages, or use it as a substitution variable and the right value is there.
    I then tried setting the value of the page item with the value of the application item and (according to session and debug) the right value ends up in the page item. Still didn't work though.
    I then created a new page (using the sql report wizard in case I was doing something wrong manually) and tried using the application item in the same way with the same problem.
    Given that no records are being returned I assume that the database server doesn't care for the SQL query it sees. Is there a way of seeing what this is? When I look at the debug messages, all I see is 'parse query' and 'binding' messages. Any way I can see what the database server eventually sees?
    Matt

  • Setting the value of an Application Item (setting a global variable);

    In APEX 3.2.0.00.27, I need to initialize a global variable to 0 to implement a variable for testing to see if anything on the page has changed. Will update to 1 when certain select lists on the page are changed. Have read through some similar questions and replies within the forum as well as other blogs and sites. So, I believe what I am doing is the way to go about this. Unfortunately, my initialization of an application item/global isn't happening yet. here's a rundown of what has been implemented:
    1) created an application item, G_CLASSIFICATION_ID_NEW in the shared components;
    2) created Javascript (JS) function called by addLoadEvent in the page html header region so when the page loads, the G_CLASSIFICATION_ID_NEW global/application item should get set to 0 with the following JS and using AJAX and htmldb_GET:
    <script type="text/javascript">
    function initVars()
    alert("before get initvars");
    var get = new htmldb_Get(null,$x('pFlowId').value,null,22);
    get.add('G_CLASSIFICATION_ID_NEW', 0);
    gReturn = get.get();
    if(gReturn){
    alert(gReturn.value);
    get = null;
    alert("after get initvars");
    alert("before call to initpage");
    addLoadEvent(initVars());
    </script>
    I've used the htmldb_Get with success for populating other global variables and running On Demand Processes with onchange JS calls in the html form element attributes within select lists on the page. Afterwards, I can check the globals via the Session window and searching on Application Items. Unfortunately, I'm missing something because my G_CLASSIFICATION_ID_NEW never gets populated when I load the page. The alerts all popup when the page is loaded, so I know the script is being executed when the page loads. the alert(gReturn.value) comes back undefined. And, needless to say, the G_CLASSIFICATION_ID_NEW to 0 is not occurring.
    I've tried the htmldb_Get with it calling an application process and without (set to null). From what I've read, you shouldn't need to call an on demand process to have the get.add set the global variable. Then again, this could be where I'm going wrong. however, as I've mentioned, this works for other functions called from an onchange to populate an application item, but the page has already loaded when the onchange(s) get executed. They may work because the page is already loaded when the onchange is called. My point here is that my other On demand processes are NOT setting or changing the global variables at all. The globals are getting set with the get.add(<app item>, <value>) portion of my other JS functions within the HTML Header region. So, I'm inclined to believe that I don't need the 'application_process=<some_odp>' parameter set, but if that's not true, please let me know. if so, what would need to be in the on demand process--ie, what would be the purpose of the get.add(<application item>, <value>) if I set the global variable in the on demand process because that's the only thing I could think of doing within an on demand process for this?
    If somebody can point out what I'm not understanding or failing to do here, that would be great. I'm doing fine with APEX, but wouldn't consider myself a guru with it just yet. I'm definitely not a JS/AJAX guru, and when things like this go astray, I get bogged down because I'm not sure of the problem. So, I'm hoping you gurus who monitor this forum can get me going in the right direction.
    thanks,
    bob

    Hi Jari,
    Does that javascript work if you place it some of region footer on page 22 ?Yes. I cut it out of the html header of the page, and put it in the footer of the first region on the page. It initializes the variable. Putting it into the footer of the first region on the page should work for me instead of having an extra region on the page that's being picked up from page 0.
    Is your page 22 authentication public ?No. This particular page is set for an ADMINISTRATOR only. That said, I am logged in as an administrator. So, I cannot see why setting authentication should make a difference as long as I have that authentication/authorization. Also, there will be other pages where I want to use this script or a similar script, but again, those pages will not be open to the public. the authentication will be "role" based where a user will not necessarily have to be an administrator, but they will have to have a certain role to access the page. Is there a known problem or something that precludes a html header JS script from doing an addloadevent when authentication is NOT public?
    thank you,
    bob

  • How to set the value of application item using pl/sql in application process

    Hi guys,
    I want a global variable (application item) whose value will be set at the start when a user logs in to the application. The value will be retrieved from database using a sql query. I do not know the exact syntax to set the value of application item in application process. Also i want to know in which type of application process should i use to set the value of application item when a user starts a session. The value of application item varies from user to user.
    Please help.
    I am using apex 4.2
    Regards,
    Waqas

    You can use the application item as bind-variable with its name. ie. your application item is named G_MY_APPLICATION_ITEM, then you can access/set it using :G_MY_APPLICATION_ITEM.
    For example
    BEGIN
        -- assign like a variable
        :G_MY_APPLICATION_ITEM := 'LARRY';
        -- use in a SQL statement
        SELECT WHATEVER_COLUMN
          INTO :G_MY_APPLICATION_ITEM
          FROM MY_TABLE
         WHERE USERNAME = :APP_USER
    END;
    Peter

  • List of Values using page item variable

    I know there has to be a simple solution to my problem but I cannot figure it out. Any assistance would be greatly appreciated.
    I have a Shared list of values that I want to reuse on several of my pages. I have tried (I thought) all the variable possibilities but cannot figure out how to reference the page item in my list of values.
    Original code:
    select app_name d, app_sys_id f
    from ops_application
    where :P32_RADIO2 = 'Application'
    union
    select db_name d, db_id f
    from ops_database
    where :P32_RADIO2 = 'Database'
    Doesn't work:
    select app_name d, app_sys_id f
    from ops_application
    where 'P'||:APP_PAGE_ID||'_RADIO' = 'Application'
    union
    select db_name d, db_id f
    from ops_database
    where 'P'||:APP_PAGE_ID||'_RADIO' = 'Database'
    I also have tried 'P'||v('APP_PAGE_ID')||'_RADIO'
    'P'||&APP_PAGE_ID.||'_RADIO'
    'P&APP_PAGE_ID._RADIO'
    'P'||:APP_PAGE_ID||'_RADIO'
    Thanks,
    Gayle
    Edited by: user8116955 on Sep 27, 2010 12:25 PM

    Gayle,
    I haven't tried this, but what about
    where v('P'||:APP_PAGE_ID||'_RADIO') = 'Application'That should allow you to build up the name of the page item dynamically, and then test the value...
    A lower-quality solution would be to use an application item rather than a page item, as then you'd know the name ahead of time.
    Let me know if this works,
    -David

  • How to populate an application item using ONCHANGE.

    I am trying to populate an application item, TAB_INSTATE using an onchange command. I cannot figure out how to do it. Does anyone know the syntax, or can you point me in the right direction. I am unfamiliar with javascript and have been relying on previous examples, posts. thanks
    apex_item.select_list_from_query
    (20,
    c020,
    'select partner_name, partner_abbrev
    from partners
    where state_code is not null order by partner_name ',
    'style="width:100px"'
    || 'onchange="'
    || CASE
    WHEN :p300_authorization1 = 1
    THEN 'f_set_casc_area(this,f21_'
    || LPAD (seq_id, 4, '0')
    || ');'
    ELSE
    <THIS IS WHERE I WOULD LIKE A THE VALUE OF c020 TO BE PLACED INTO :TAB_INSTATE>
    END
    || 'f_set_casc_subarea(this,f22_'
    || LPAD (seq_id, 4, '0')
    || ')"',
    'YES',
    '0',
    '- Select State -',
    'f20_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO'
    ) in_state,

    Hello Karen,
    >> I am trying to populate an application item, TAB_INSTATE using an onchange command.
    I believe I answered you in here - Re: once more...4 cascading LOVs, 3rd is hidden 4th no longer works However, for future reference…
    You don’t have a direct access to an application item, using JavaScript, because application items don’t render on page. You can, however, using the AJAX framework to do that, using the add() method. The generic code I’m using is the following:
    <script type=”text/JavaScript”>
    function setSessionValue(pItem, pValue) {
      var get = new htmldb_Get(null,html_GetElement('pFlowId').value,null,0);
      get.add(pItem, pValue);
      get.get();
      get = null;
    </script>This code can set any page or application item value.
    Regards,
    Arie.

  • Use of application Item with conditional validation

    Apex 3.2
    On a form, I have two lists :
    - Items TYPE contains A B C and D.
    - Item MANAGEMENT contains NULL, 1, 2 and 3.
    I want to validate that MANAGEMENT is not null only when the value in TYPE are A, B or C.
    I am using the condition "Value of Item in Expression 1 Is Contained within Colon Delimited List in Expression 2"
    I dont want to hard code these values (A B C) so I put them in an Application Item (I also need them somewhere else).
    If I use my application Item in the condition, the validation is not performed (I dont see it listed in debug mode.). If I use the real values (A B C), its working.
    Here's what I put in the Exp2 when using the application item :
    F126_CONST_BUSINESS_CASE:F126_CONST_PROJ_NON_PLANIFIE:F126_CONST_PROJ_PLANIFIE
    I also tried with the form v('F126_CONST_BUSINESS_CASE'): ...
    Any Idea ?
    Thanks in advance.

    Hi Amelie,
    You should consider centralizing your validations inside a package. It will make your code much more readable. In many cases, you won't have to modify your application to modify a validation.
    If your validations are required across different pages, consider having a main package or build package a package for each module (page or page groups).
    The following condition for a validation is easier to understand than "Value of Item in Expression 1 Is Contained within Colon Delimited List in Expression 2".
    Condition Type PL/SQL Expression:
    p1_valdt_pkg.is_item_mangm_mandt(:P1_ITEM_TYPE,:P1_ITEM_MANAGEMENT)
    create or replace function is_item_mangm_mandt (pva_item_type in varchar2,
    pva_item_mangm in varchar2)
    return boolean is
    vbo_valdt boolean default true;
    vva_const_business_case varchar2 (30) default v ('F126_CONST_BUSINESS_CASE');
    vva_const_proj_non_planifie varchar2 (30) default v ('F126_CONST_PROJ_NON_PLANIFIE');
    vva_const_proj_planifie varchar2 (30) default v ('F126_CONST_PROJ_PLANIFIE');
    begin
    if pva_item_mangm is null
    and pva_item_type in (vva_const_business_case, vva_const_proj_non_planifie, vva_const_proj_planifie) then
    vbo_valdt := false;
    end if;
    return vbo_valdt;
    exception
    when others then
    return false;
    end;
    Louis-Guillaume Carrier-Bédard
    My Blog: http://www.lgcarrier.com
    Twitter: http://www.twitter.com/lgcarrier
    APEX Québec: http://www.apexquebec.com
    APEXFramework: http://www.apexframework.com

  • How to read application item's value using  javascript

    Is there any way to read value of application item using javascript?
    Thanks

    Javascript can access the objects rendered for the page you are calling. This is why the $v function will do the work if calling it for a page item. However an application item isn't rendered on the page - the session state of it is only stored in the table. This is why you need to do it the way I described. You could do a workarround and create a hidden item on your page and compute the value of it using the application item value. Then you would be able to get the value of your application item using $v function.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • Flashbuilder and Cold Fusion  (using application/session variables)

    I would like to know if anybody uses Flashbuilder with Cold Fusion?
    Since Cold Fusion has lots of different scopes of variables (application, session, client, form, url, etc...) how do you manage this in Flex/Flashbuilder?
    Are there forums or groups specifically for using Flex3/Flashbuilder with backend server side technologies such as Cold Fusion?.
    The only server side technology that I have interest in is Cold Fusion.  I've seen basic tutorials and videos using Cold Fusion CFC's and data binding with Flex.  I haven't seen or heard anything using a Cold Fusion application, session, or client variable in Flex.
    Hopefully some of you have some experience on this topic.
    Thanks

    hey popster,
    i too had this question some time ago. my entire app was built on CF with HTML before i started integrating Flex 3 with it. i found that i needed to create cookie variables for all my session variables i was using in order to maintain and remember who the user was in my CFC calls. i also found that after i compiled a flex app, i changed the .html to .cfm (the file that loads the compiled SWF file). by doing this i was able to pass CF session variables into the flex app and you can refer to these anywhere in Flex by using Application.application.parameters.{variable name here} 
    add the CF variable in the FlashVars line to pass it into Flex (see the last line of code). this will create a variable (in my case i'm passing session.employeenumber). then in your flex app you can reference it by using Application.application.parameters.emplid:
    AC_FL_RunContent(
       "src", "Request",
       "width", "100%",
       "height", "87%",
       "align", "middle",
       "id", "Request",
       "quality", "high",
       "bgcolor", "#869ca7",
       "name", "Request",
       "allowScriptAccess","sameDomain",
       "type", "application/x-shockwave-flash",
       "pluginspage", "http://www.adobe.com/go/getflashplayer",
       "wmode","transparent",
       "FlashVars","emplid=<cfoutput>#session.employeenumber#</cfoutput"
    A little trick I learned (does Adobe really expect us to re-engineer how our apps have been working by no longer using sessions for Flex?). Then in your CFCs if you also create cookies for every session variable you can maintain the variables based on user login. HOPE THIS HELPS!
    -Matt

  • How to set value of application item using Java script.

    I have created a textbox on page 0, on chnage of textbox i want to set the value of application item.
    How to write the code to set & get value of application item.
    Thanks,
    -Amit

    Hello Amit
    This would be a great place to start...
    JavaScript
    Alternatively, APEX 4.0 will make this sort of task declarative.
    Kind regards
    Simon Gadd

Maybe you are looking for

  • Disk Access Slowdowns

    Hi! Is there something else in Snow Leopard putting disks to sleep during routine use? I'm finding that it's much slower at populating some lists - for example, the list of most recent files accessed in MSWord, and the list of local directory files i

  • Problem entering the Host Printer name in SPAD...

    Hi, I have problem configuring the printer in SPAD. In the access method, I am trying to add the TCP/IP address of the network printer instead of the printer UNC name. Is this the problem ? If yes then how do I get the UNS name of the printer attache

  • FCP keeps quitting on me!

    Hi, I am running FCP on a MacPro, version 10.5.8, with 6 gig of memory. But I am suddenly running into a situation where the program quits on me every couple of minutes. Any thoughts that might help would be greatly appreciated as I face a deadline o

  • SELECT ROWNUM and ORDEY BY DATE

    I want to select the most recent row from a table where one column is null and have the following query. 'select * from table_name where rownum < 2 and column1 is null order by date_stamp desc' Date_stamp column holds the system date when each row wa

  • "java.lang.NoClassDefFoundError:RequestCB" error

    Does anybody know what this error means and how to solve it please? Thanks Mike