AJAX - Application Process lookup

Ok - after a couple of days querying this forum and trying various things I admit defeat!
Help! :)
I confess to being an AJAX illiterate.
I have an item, to be entered by the user, named P5_RESPONSE_LINE_NUMBER, which is a call number.
I want to (immediately) populate another field, named P5_CALL_DESCRIPTION, with the value retrieved from a table using P5_RESPONSE_LINE_NUMBER as the key.
So based on various postings here, I end up with the following.
Application Process (Simple_Example):
~declare~
~l_id number;~
~l_value varchar2(4000);~
~begin~
~l_id := :p5_response_line_number;~
~select short_description into l_value from calls~
~where response_line_number=:p0_id;~
~htp.prn(l_value);~
~exception when others then~
~htp.prn('Oops!');~
~end;~
HTML Header
~<script type="text/javascript">~
~<!--~
~function f_TestOnDemand(pThis){~  
~ var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=SimpleExample',$v('pFlowStepId'));~
~ get.add('P0_ID',pThis.value);~
~ gReturn = get.get();~
~ get = null;~
~ gReturn = (!gReturn)?'bamboozled':gReturn;~
~ $s('P5_CALL_DESCRIPTION',gReturn);~
~}~
~//-->~
~</script>~
HTML Form Element
~onBlur="f_TestOnDemand(this);"~
All that I get displayed in the P5_CALL_DESCRIPTION item is the text "bamboozled". I would hope to see either 'Oops' or the "looked up" description.
Any pointers greatfully accepted.
Thanks,
Rob

Hello Rob,
You are calling your Application Process with a (sort of) parameter:
get.add('P0_ID',pThis.value);
(I assume this item exists..., just checking).
You can also (better?) use the built in session variables x01..x10
get.add('x01',pThis.value);
Then, in your Application Process:
l_id := to_number(wwv_flow.g_x01);
select short_description into l_value from calls
where response_line_number=l_id;
And remove the l_id := :p5_response_line_number;, you don't use/need it.
I guess your Application Process cannot be executed and that doesn't result in an error, but in ...nothing...
Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct ;-)

Similar Messages

  • Application process is not getting the data from table

    I have created the following application process based on AJAX select value but using a pop up LOV
    DECLARE
    my_det VARCHAR2 (200);
    BEGIN
    SELECT DM_00010_CUST_NAME INTO my_det
    FROM ODM_MD_00010
    WHERE DM_00010_CUST_CODE = nvl(:P11_DT_00020_CUST_CODE,21);
    exception when no_data_found then null;
    HTP.prn (my_det);
    END;
    the process is getting no data found error ( hence the exception) so I am getting NULL in the name field on screen.
    any help ?

    the javascript I have in the region header is:
    <script language="JavaScript" type="text/javascript">
    function f_getDet ()
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getDet',0);
    get.add('P11_DT_00020_CUST_CODE',html_GetElement('P11_DT_00020_CUST_CODE').value)
    gReturn = get.get();
    if(gReturn)
    {  html_GetElement('P11_DT_00020_CUST_NAME').value = gReturn  }
    else
    {  html_GetElement('P11_DT_00020_CUST_NAME').value = 'null'  }
    get = null;
    </script>

  • On Demand Application Process not working on IPad or IPhone

    I have application processes that use AJAX to refresh my select list values (see code below). They all work fine on normal devices, but they do not populate at all if I try from an IPad or IPhone. Any ideas?
    HTML Form Element Attributes:
    onactivate="get_select_list_xml1(this,$x('P507_FORMS'),$x('P0_LOGIN_SCHOOL_YEAR'),this,'REFRESH_REPORT_LAYOUT_LOV');" onfocus="if((typeof this.onactivate)!='function'){get_select_list_xml1(this,$x('P507_FORMS'),$x('P0_LOGIN_SCHOOL_YEAR'),this,'REFRESH_REPORT_LAYOUT_LOV');}"
    Application process:
    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 '2' o, A.report_layout_desc d, A.report_layout r
    FROM form B, report_layout A
    WHERE A.fk_form = B.pk_id and
    B.form = :REFRESH_LOV_PK_ID
    ORDER by 1,2)
    LOOP
    HTP.prn ('<option value="' || c.r || '">' ||
    c.d || '</option>');
    END LOOP;
    HTP.prn ('</select>');
    END;

    bobmagan wrote:
    It fires on both onactivate and onfocus. I had to do that to work on the Mac clients. Look at the code:
    onactivate="get_select_list_xml1(this,$x('P507_FORMS'),$x('P0_LOGIN_SCHOOL_YEAR'),this,'REFRESH_REPORT_LAYOUT_LOV');" onfocus="if((typeof this.onactivate)!='function'){get_select_list_xml1(this,$x('P507_FORMS'),$x('P0_LOGIN_SCHOOL_YEAR'),this,'REFRESH_REPORT_LAYOUT_LOV');}"What about just
    onfocus="get_select_list_xml1(this, $x('P507_FORMS'), $x'P0_LOGIN_SCHOOL_YEAR'), this, 'REFRESH_REPORT_LAYOUT_LOV');"If not, supply the following information:
    <li>Full APEX version
    <li>Full DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s)/version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/Item type(s)
    and the <tt>get_select_list_xml1</tt> JS code.
    Post code wrapped in tags<tt>\...\</tt> tags to preserve formatting and special characters.

  • For Loop with parameter in application process

    Hello,
    I am working on a project for school and a loop in an application process is giving me a headache. I have an application from which I make an ajax call to an "on-demand" process. Here's a short version of the process:
    declare
    valuesList varchar2(32000) := '';
    sqlWhere varchar2(32000) := '';
    begin
    begin
    //calculations, but let's hard code sqlWhere for demonstration purposes
    sqlWhere := ' where ID = 50';
    for j in (select * from myview sqlWhere) loop
    valuesList :=valuesList || '~rowsep~' || j.id || '~colsep~' || j.beds;
    end loop;
         exception
         when no_data_found then null;
         when others then HTP.p('Error: ' || SQLERRM);
    valuesList := substr(valuesList, 9, length(valuesList));
    end;
    htp.prn(valuesList);
    end;
    I thought the for loop would contain only one record but it lists all records in the view. Interestingly, when I replace the loop condition to 'select * from myview where ID = 50' it returns what it's supposed to.
    Could someone please explain what I am doing wrong?
    Thank you!

    There are a couple of different options but using a variable in the sql statement and not the where clause needs an execute immediate. The link below gives a good overview and options to accomplish what you are trying to do.
    execute immediate with for loop
    Edited by: tread on Apr 23, 2012 1:09 PM

  • On Demand Application Processes

    Hi,
    I was trying to create a report like the one that was posted in the thread Question for Carl Backstro: http://apex.oracle.com/pls/otn/f?p=11933:13.
    Except that I had some problems with the creation of on-demand process, because when I go to create it always gives me an error:
    "To create an on-demand page process, at least one application level process must be created with the type 'ON-DEMAND'."
    I also tried to follow the guide: http://download-uk.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28550/bldr.htm # BABEAIIE
    but I could not find a solution.
    To start where I put the following string:
    http://hostname.com: <port> / pls / apex / f? p = <APP_ID>: <PAGE_ID>: <SESSION_ID>
    Thank you in advance.

    Hi,
    P13_MULTI_0 is the checkbox at the top-left on Carl's page called "Show Multiple". This allows you to click Show Details for more than one row - if this checkbox is not ticked, then when you click on a second "Show Detail" link, the first one is hidden again. If you want to be able to see more than one "Details" at any one time, you would need to include a checkbox like this. If, however, you only really need to see one "Details" at a time, then you can ignore the checkbox and remove this part of the javascript.
    For the Ajax part, the three lines that I quoted before:
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=Random_Desc',0);  
    get.add('TEMPORARY_ITEM',pID)  
    gReturn = get.get();relate to using Ajax to get the "Details" information to display within the report. Ajax is a means of javascript calling a procedure on the server without having to submit the page. On normal HTML pages, this code would be more complicated, but Apex have provided shortcut functions for us to make this easier to use.
    The first line prepares the Ajax call - htmldb_Get() is the Apex shortcut function. $x('pFlowId').value is the Application ID for your application. 'APPLICATION_PROCESS=xxxx' is the On Demand application process that you want to call. The last parameter is usually either 0 (zero) or your page number.
    The second line is how you can update Application Items with a value that can be used by the Application Process. In this example, there is an Application Item called TEMPORARY_ITEM and it will be set to the value of pID. pID is the ID for the "Show Details" item that has been clicked.
    Finally, get.get() is how the Ajax call is actually made and runs the Application Process. The results from the process are stored in the gReturn variable. What you do with gReturn depends on your reason for using Ajax. In Carl's example, we just transfer the entire thing into the new row that is created underneath the current row, by using:
    myNewCell.innerHTML = gReturn;"myNewCell.innerHTML" refers to the contents of the TD cell that has been created by the javascript code to show the details.
    Andy

  • DOC BUG 4.2: About On Demand Application Processes

    There is an error in Oracle Application Express Application Builder User's Guide Release 4.2 §8.8.1 "About On Demand Application Processes":
    An On Demand process is special type of application process which has a Process Point of On Demand and executes when called from a page-level On Demand process or from an AJAX call from the browser. On Demand processes are useful when you have PL/SQL logic that you would like to run from different execution points across multiple pages.
    On Demand processes should typically be created on a page and not at the application-level. On Demand processes created at the application-level are created with an initial authorization scheme of Must Not Be Public User. This prohibits the processes being invoked from users in authenticated sessions.
    As it is perfectly possible (and indeed desirable) for On Demand application processes to be invoked [only] by authenticated users, this should presumably read:
    An On Demand process is special type of application process which has a Process Point of On Demand and executes when called from a page-level On Demand process or from an AJAX call from the browser. On Demand processes are useful when you have PL/SQL logic that you would like to run from different execution points across multiple pages.
    On Demand processes should typically be created on a page and not at the application-level. On Demand processes created at the application-level are created with an initial authorization scheme of Must Not Be Public User. This prohibits the processes being invoked from users in unauthenticated sessions.
    Furthermore, the second paragraph is a new addition to the documentation for APEX 4.2. What is the reasoning for not creating On Demand processes at application level? I have used them for a number of years as a means to provide reusable, application-wide components (for example, file downloads and AJAX content) only to authenticated APEX sessions.

    Hi,
    thanks again. I added a note to the 5.0 docs.
    It is certainly fine to still create application-level On Demand processes. However, if a process is related to a single page only, it is immediately clear that the process is part of this page's interface. This is good from a maintenance point of view, because if you only use app-level processes, it can be harder to determine whether the process is still in use and where it is called from.
    Regards,
    Christian

  • Obtaining custom HTTP GET / POST parameters of variable length in Application Process

    Hi, I'm trying to connect a javascript UI control within my page to an APEX Application Process.
    The control calls the application process via AJAX and appends a variable number of GET / POST parameters to its URL.
    What is the best way to obtain these parameters from within the PLSQL procedure of the process? Or is there a better way to connect my javascript AJAX control to the Database behind my APEX app?
    Thanks,
    Steffi

    Steffi,
    I'm using APEX 4.1 and I've not used Treegrid before. It does look pretty interesting.
    Firstly, I'm not sure if you are aware but GET requests aren't as secure as POST requests. GET simply appends a key/value pair to the server as part of the url which can be easily sniffed. POST request on the other hand sends the data as key/value pairs to the server in the header which makes it harder to intercept.  This is why APEX outputs forms with POST methods.
    Secondly, back to your original question.I'm not sure this is possible with an Application Process. In the passed I've used POST methods to pass values to my Application Process. I have some code using native jQuery if you would like to see how its done. Alternatively, if you convert your application process to a standard pl/sql procedure (i.e SQL Workshop>Object Browser>Procedures) you can call this procedure and pass in values as you would with any PHP page.
    Simple example (untested)
    CREATE OR REPLACE PROCEDURE  "foo" ( my_name varchar(20)  
         , count NUMBER)
    IS  
         p_name varchar(20) := my_name;
         p_count NUMBER     := count;
    BEGIN
    --Do what you want
    --output something
       htp.p(p_count || '.: '|| p_name);
    END;
    The url on the page (or ajax call) would be something like "/pls/apex/{MY SCHEMA}.foo?my_name=Alistair&count=1"
    Of course for text you will need to escape single colons and special characters etc.
    I would really like to help you further so if you could create a working demo using a free workspace on http://www.apex.oracle.com and provide me with demo username/password. I can try and have a better look for you.
    In all honesty, I'm sure you would be looking to create this as a plugin so that you can easily reuse it in various parts of your application and can easily update it or maintain it. I can help you with that as well if you want.
    Alistair
    P.S You might want to update your profile on this forum to provide your name so people dont just see "31742965-2d09-4f42-849f-e39eb2cfbc9e" your profile name

  • If-statement in application-process

    Hi,
    First I will tell you which APEX I am using: 3.0.1
    Ok, I have got a form where there are 4 fields:
    P13_ACCTNO (Popup LOV (fetches first rowset)),
    P13_LOCATION_NAME(Text Field (Disabled, saves state)),
    P13_COMP_ACCTNO( Popup LOV (fetches first rowset)),
    P13_LOCATION(Text Field (Disabled, saves state))
    In my table, the company is always filled in, no null values (but it is not the PK, this is the acctno). But location may be null.
    When I select a location (popup will only show fields which are filled in), then the other fields are filled in as well. So the Location (number) and the acctno is the same.
    Now, when I select a comp_acctno, the rest of the fields are filled in automatically. But the Location (number) will remain from the first select, although no location might be there.
    So I have got 2 javascript codes on the page and 2 applicationprocesses and 1 application item.
    I would like to have an if-statement in my application-process (instead of " HTP.prn ('<item id="P13_LOCATION">' || v_null || '</item>');", something like:
    if :p13_location_name is null then
    :p13_location = ' ';
    end if;
    But I don't know how to put this into the following code, because it is a mixture, which I don't understand completely.
    DECLARE
    v_acctno primemines.acctno%type;
    v_company primemines.company%type;
    v_mineloc primemines.mineloc%type;
    v_commodity primemines.commodity1%type;
    v_null varchar2(5);
    CURSOR cur_c
    IS
    SELECT acctno, mineloc, company, commodity1
    FROM primemines
    WHERE acctno = TO_NUMBER (:temporary_application_item);
    BEGIN
    FOR c IN cur_c
    LOOP
    v_acctno := c.acctno;
    v_company := c.company;
    v_mineloc := c.mineloc;
    v_commodity :=c.commodity1;
    END LOOP;
    v_null := '';
    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 ('<body>');
    HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
    HTP.prn ('<item id="P13_ACCTNO">' || v_company || '</item>');
    HTP.prn ('<item id="P13_LOCATION_NAME">' || v_MINELOC || '</item>');
    HTP.prn ('<item id="P13_COMMODITY">' || v_commodity || '</item>');
    HTP.prn ('<item id="P13_LOCATION">' || v_null || '</item>');
    HTP.prn ('</body>');
    and also I have discovered that the automatically filling of the fields is only working sometimes (i don't know whether it depends on the company I select). Any ideas, why this is happening?
    could somebody help me with the code please?
    Thanks,
    regards,
    Denise

    Hi,
    @Chad: thanks for the code, I think it works (UPDATE: no, it does not work :-( )
    now i am just left with the other problem that it works only sometimes
    @user512746: yes, i guess you have understood correctly. I have changed the items P13_ACCTNO source used to "always replace" and taken out the default value, which I had set to &P13_ACCTNO.
    But it still only works partly, I don't know why?
    any other ideas?
    Thanks so much for your help so far, both of you.
    Regards,
    Denise

  • How to execute a statement in application process on new authentication

    Hi all,
    How can i execute a statement such as
    set role TABLE_NAME identified by sunil;
    in my application process?
    I have tried exec('set role TABLE_NAME identified by sunil');, but wasn't successful. Does anybody knows the problem in my syntax?
    Thanks,
    Sunil Bhatia
    Edited by: Sunil Bhatia on Jun 25, 2009 12:33 PM

    Can you proceed me to this direction?No, it's still the wrong one.
    DB roles are not used in APEX due to fundamentals of APEX and Oracle architecture: this is clear when it is understood Re: Priveleges to create procedures/functions in schemas (points 3 &amp; 4 being most relevant to this issue &ndash; and read "APEX" for "HTML DB")
    (If anyone knows of a more "official"/complete description of what goes on under the covers than the referenced Forum post it would be helpful to know about it.)

  • Application process code is not getting the value

    Hi
    I have implemented search functionality on page 0 (One Textbox and one ImageButton).
    on clicking on image button
    I am calling a application process to redirect a page on the basis of entered value.
    I am using following code in application process:
    DECLARE
    l_number NUMBER;
    rec_count NUMBER;
    BEGIN
    l_number := TO_NUMBER(:P0_SEARCH);
    SELECT COUNT(*) INTO rec_count FROM CASE_DATA WHERE CASE_NUMBER = l_number;
    if rec_count >= 1 then
    OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P42_CASE_NUMBER:l_number');
    End if;
    exception
    when others then
    NULL;
    END;
    :P0_SEARCH is the name of search textbox that is on page 0.
    when i clicking on image button then this value of l_number is not passed to the
    OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P42_CASE_NUMBER:l_number');
    its giving an error
    ORA-01722: invalid number
    and in url its showing
    http://apex.oracle.com/pls/otn/f?p=31774:42:16398188927210884::NO::P42_CASE_NUMBER:l_number
    but its working if i am putting the static value as
    OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P42_CASE_NUMBER:22');
    its redirecting the right page as
    http://apex.oracle.com/pls/otn/f?p=31774:42:16398188927210884::NO::P42_CASE_NUMBER:l4
    So, please help me how to pass the value to redirect.
    Thanks
    -PM

    Hi,
    Try
    OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P42_CASE_NUMBER:' || l_number);Br,Jari

  • APEX Application Process Automation

    In my app, I have to keep track of people who are going on vacation and when they are coming back to work; In my employee table, there is a column named status that shows whether they are on "Vacation" and when they are "On-Duty". Based on the status column, these employees will be listed on one of two report pages - Employees - On-Duty and Employees - On Vacation
    There are two tables which are being used.
    1. Emps
    2. Leave
    In the Leave table there is a start_date, end_date and Leave_type that is associated with a employee record in the employee table. The Leave_type column shows what type of leave that particular person will be going on in the next month.
    My goal is to create an automated process that changes that "status" column for the employee in the employee table, when the start_date in the leave table ='s the current date.
    Can someone make a suggestion on how I can automate this process and point me in the right direction as to how to code this?
    My First issue with the req is that I am not sure what feature I should use to reach my goal.
    Should I use an Application Process, Application Computation, or an OnLoad Page event.
    My second issue that as I am familiar with SQL, but I am not too savvy, yet, with PL/SQL. I am not sure how to write the PL/SQL code to faciliate this need. Below, is a pseudo-code that I have outlined.
    1. Open cursor for all employees who are in On-Duty status.
    2. Within that cursor, find the last leave_table row entered in the db for each employee.
    3. If start_date is = to current_date, update employee status column to = leave_type column in the leave_table.
    Any help would be greatly appreciated.
    {PR}
    Message was edited by:
    pruiz1

    It will be very difficult for me to change the status column in the reports. Reason being, I have about 7 categories for employees/prospects that are being used in the emp table.
    1. On-Duty
    2. R&R
    3. Adminstrative leave
    4. Standby - waiting to be hired on contract
    5. Disqualified and
    6. Terminated
    7. Resigned
    If there were only two statuses On-duty and R&R(vacation), i would have no problem doing so. Also, i have had some issues modifying views in APEX, which I never sorted out.
    For 3-5, I cannot think a scheme to use so that I can move the status column from the emp table to the leave table.
    For 6-7, I have a work_history table that is joined to the employees who are in this status. Once a person is terminated or has resigned, the work_history table is updated manually by the field.
    {PR}
    Message was edited by:
    pruiz1

  • Applescript and application process name on osx 10.10

    I have an application that I'm running on OSX, and I have this AppleScript that was working on 10.9, but it seems that it does not work on 10.10
    try tell application \"System Events\" to set processPath to application file of application process "My Application" return POSIX path of processPath on error errMsg return "" end try
    When I run this in the AppleScript editor, it gives me the error that "System events got an error: Can't get application process "My Application".
    I checked the Activity Monitor, and indeed, there is no process called "My Application" in there. The associated process with my application is now registered by the name "SWT". I confirmed this by killing the "SWT" process, and it killed my app.
    I tried setting the Application name to "My Application", (using Display.setAppName("My Application");) inside my code, which worked, and now I am able to see a process called "My Application" in the Activity Monitor, but the AppleScript is still not working. The new error that I'm getting now is:
    Can’t make alias \"Macintosh HD:Library:Java:JavaVirtualMachines:jdk1.7.0_71.jdk:Contents:Home:bin:java\" of application \"System Events\" into the expected type
    My question is, what has changed from 10.9 to 10.10, and why is my application registered as "SWT" process, instead of "My Application", as it was in 10.9?

    I have an iMac 2.16GHz and a MacBook 2.4GHz. Both were running 10.5.2; I have since updated the iMac to 10.5.3. I also have an old machine running OS X 10.2.8 server. (OK, laugh. But it works!) Before upgrading my iMac to 10.5, I could copy files to and from that server pretty quickly.
    Now, anything of size takes forever. I am connecting over wired ethernet (but wireless, having tried, is no better). I have a Airport Extreme router with Gigabit, and a separate Asante 8-port 10/100 switch. No matter how anything connects, a transfer of 200mb or so takes almost 30 minutes.
    I brought a friend's machine over running 10.4.11, and it transfered to the old Mac server the same 200mb file in less than 3 minutes or so. What I would expect.
    Thinking maybe the old 10.2.8 server was too old for 10.5, I subbed in another machine running 10.4.11 server. The times to it were terrible, too, from any of the 10.5 machines.
    I tried turning off IPV6, then the times went to hours to copy, so I turned it back to Auto. I have read that maybe there are other network settings (such as those changeable with a tool such as Cocktail) that could be the culprit. I have not explored that.
    This post is definitely not closed or solved!
    Pete

  • Web application processing terminated

    Hi Fellow SDNers,
    My user is trying to execute a report from a portal. He is getting the below error while executing the report:
    Web application processing terminated
    Diagnosis
    The system had to terminate processing of the Web application.
    The reason could be that the system was no longer able to find the Web application server session.
    System Response
    Processing the navigation step is not possible.
    Procedure
    Call up the Web Application again.
    Note: Use the start URL and not the URL that is currently displayed in the Web Browser.
    Procedure for System Administration
    Notification Number BRAIN 278
    However, when I tried running the same report from the portal with same user credentials, I'm not getting any error.
    I suspect, its due to the IE setting. I got the cookies and offline IE files deleted from the user, but all in vain. User still faces the same issue. I'm still wondering, its not a issue with the BI system. This might be due to some network settings or IE settings.
    But the issue is only for one report, rest of the reports are running fine for the user.
    Kindly help me, if anyone has faced this issue earlier.
    System Details:
    Patch: SAPKW70015
    release: 7.0
    Regards,
    Satyam

    Hi,
    Check if the entry exists in table RSZWVIEW for your report.
    Regards,
    Durgesh.

  • Invoking a webservice as an "application process"

    Hello there,
    I have setup a web service successfully and I can invoke it as a "Page Process", get the response in a collection , and do a few validation based on it.
    However, I will need this validation for most of my pages in the application, so I thought, I would rather run it against the application as a whole.
    The issue came when I try to invoke the web service as an "Application Process" rather than a page process. Unfortunately APEX does not seems to give an option to invoke a web service on application level as it does for page level.
    For Application Process, apparently I can only run a PL/SQL block, which is fine; if I know how to make a call to the web service and fill the collection from a PL/SQL Block.
    My application does not have a particular page as "home entry"; users basically will be accessing different pages as entry points. I really don't like to invoke WS calls on each of the page to get the collection filled, so my validation could run - I mean I will have only this option unless this tread yield me with an alternative :)-
    I am sure someone must have gone through similar situation, and hopefully could provide a solution or workaround for me.
    Thanks a lot in advance
    Regards
    Ligon Gopinathan

    Ligon:
    Yes, using NTLM authentication does complicate things a bit. However, I think it may be possible to to achieve the goal of pushing all users to a fixed landing page upon successful session establishment by the NTLM page-sentry function and from thereon to the page the user requested. This landing page will have 2 'before header' processes , one that will call the Web Service and the another that will simply re-direct the user to the page that was initially requested.
    In the page-sentry function you can modify the call to 'wwv_flow_custom_auth_std.post_login' such that the parameter
    p_flow_page is set to 'apex_application.g_flow_id ||':'<landing-page-id>'
    You will also need to save off the actual page requested( the value of apex_application.g_flow_step_id) into an application_item which you can then reference in the pre-header process of the landing-page.
    I must caution you that I have not tested whether this approach will work but decided to throw this out here anyhow :)
    Check http://www.oracle-base.com/articles/10g/utl_dbws10g.php out for a how-to for calling out to Web Services using PL/SQL .
    Varad

  • Use APEX_APPLICATION in an application process called by a javascript

    I have a page that is split into two; Top portion is a form, and the bottom part is a tabular form of a collection. Currently, if I enter information into the form and the collection and then submit the collection (to save the data to the collection) it erases the information in the form (since submitting for the form is separate). The same thing happens when I attempt to delete certain rows from the collection.
    My solution to this problem was to use javascript to call an application process (that way the page isn't completely refreshed, only the collection portion). However, I can't seem to get the apex package APEX_APPLICATION to work correctly as an application process (works fine as a process on submit as a page process).
    Below is the way I use apex_application for saving:
    begin
    for x in 1..apex_application.g_f03.COUNT
    loop
    apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f03(x),
    p_attr_number => 8,
    p_attr_value => apex_application.g_f08(x));
    apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f03(x),
    p_attr_number => 9,
    p_attr_value => apex_application.g_f09(x));
    apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f03(x),
    p_attr_number => 10,
    p_attr_value => apex_application.g_f10(x));
    apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f03(x),
    p_attr_number => 11,
    p_attr_value => apex_application.g_f11(x));
    apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f03(x),
    p_attr_number => 12,
    p_attr_value => apex_application.g_f12(x));
    end loop;
    end;
    Below is the code I use for deleting certain elements from the collection:
    BEGIN
    FOR ii IN 1 .. apex_application.g_f01.COUNT -- checkbox
    LOOP
    apex_collection.delete_member (p_collection_name => 'SPECIES_COLLECTION',
    p_seq => apex_application.g_f01(ii)
    END LOOP;
    APEX_COLLECTION.RESEQUENCE_COLLECTION('SPECIES_COLLECTION');
    END;
    Below is the javascript I attempted to use for application process for submitting:
    function addToCollection()
    var get =
    new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=submitLandings',0);
    gReturn = get.get();
    get = null;
    }

    Your requirement is quite similar to what I have here:
    http://apex.oracle.com/pls/otn/f?p=31517:159
    Using apex_application.g_fxx will not work in the way you originaly planed to do that since an application process can't see it.
    What you can do is to use an application process to update the collection at the moment you enter your data. Apply for an account (see login page of my demo application) and you may see how I solved it in my example.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for

  • Two iTunes accounts - how do I combine them?

    I have two iTunes account (by accident). Some of my purchased music and apps are in one account and some are in the other one. A year or so ago, I was told that it was not possible to combine them. Has this changed? I would really like to have ONE iT

  • Multiple popupAnchors dont work in one application?

    hey guys... so im trying to create an application, in which when you click a button a datagrid popups up using a popupAnchor and after, when i click on a item in that datagrid, i need another popup anchor to popup above the datagrid.... hope im makin

  • Passing Repeater dataProvider info to an AS function showing 1067 error

    Hi, I'm getting a compiler error 1067: Implicit coercion of a value of type String to an unrelated type Number, with this following code (against the lines x="getRelXPos({wallRepeater.currentItem.x});" and y="getRelYPos({wallRepeater.currentItem.y});

  • How do I get lost data back, after update  sync all pictures, notes and mail lost

    How do you get pictures, notes contacts and mail back, lost after update on IPhone5

  • MDM Patch

    Hi Guru's,        We are using MDM on stand alone server. we have a full landscape including back-end connectivity with SRM. I have to apply the patch to it. currently we are on sp05. I hve to update it to sp06. I have downloaded new patch last week.