JavaScript Confirm box depends on the results of query

Hello

I use Apex version 3.2.1 and I'm looking for a way to do the following, any help much appreciated:

A javascript confirm will appear when the user sends a page if the result of a query returns something, the query should look like this...

SELECT * FROM LINKEDPROJECTS
WHERE ENV_ID =: P18_ENV_ID
AND ID_COMP =: P18_COMP_ID
AND DATE_FROM < = to_date (: P18_DATE_TO, 'DD-MON-YY')
AND DATE_TO > = to_date (: P18_DATE_FROM, 'DD-MON-YY')

If it returns no data page will present as usual, if it does not return the data from the confirmation box will appear, and the message will be also the result of a query-driven.

If the message would be something like...

Project (s) + "select the NAME OF PROJECTS WHERE ID IN (SELECT PROJ_ID FROM LINKEDPROJECTS WHERE ENV_ID =: P18_ENV_ID +)"
+ AND IDENTIFIANT_COMPOSANT =: P18_COMP_ID +.
+ AND DATE_FROM < = to_date(:P18_DATE_TO, 'DD-MON-YY') +.
+ AND DATE_TO > = to_date (: P18_DATE_FROM, ' MON-JJ-AA "") "+ have this environment for the dates you selected.  Do you want to continue with the reservation?

By selecting Yes submits the page, select no hands it to the page.

Had this work now, if it can help someone else out there that's what looked like my javascript in the end...

Tags: Database

Similar Questions

  • How to start a job using DBMS_SCHEDULER depending on the result of other JOBS

    How to start a job using DBMS_SCHEDULER depending on the result of other JOBS

    For example I have two jobs A and B of EMPLOYMENT, I would like to start JOB B only when a JOB is complete, is an option like that?

    Hello

    Yes, you can create a channel with the Scheduler, see the documentation:

    Creation and management of channels of employment

    http://docs.Oracle.com/CD/E11882_01/server.112/e25494/scheduse.htm#ADMIN10021

  • JavaFX dialog box (confirmation box) is that the user cannot move forward.

    I want my application in JavaFX make up a dialog (such as the confirmation box).

    But I don't want to chance user to ignore that one.

    Does it mean that in many instances that I saw once the dialog box context-sensitive user can click on that and can ignored, so this dialog box's rest as it is never.

    Thank you.

    Dial stage.initModality (Modality.APPLICATION_MODAL), which "Defines a modal window that blocks the events to any other application window."

  • Update statement can be used depending on the result cache?

    Hi all

    I stumbled on an interesting question. UPDATE statement is used in the following function, even if the feature is created RESULT_CACHE. It seems illogical. I was wondering, is it possible?

    If so, why RESULT_CACHE is used?  Because it means "do not execute the function, look for the result of the hash table and return the results to the user ' if the UPDATE statement, so doesn't mean it should run for each call and use with RESULT_CACHE and UPDATE/DELETE/MERGE is illogical or wrong?

    Thanks for your help.

    FUNCTION to CREATE or REPLACE plch_get_data (FULL id_in)

    RETURN VARCHAR2

    RESULT_CACHE

    IS

    BEGIN

    Dbms_output.put_line ('run');

    UPDATE plch_data

    SET nm = UPPER (nm)

    WHERE id = id_in;

    COMMIT;

    RETURN "SUPERIOR."

    END;

    /

    Yes, it's the challenge of PL/SQL quiz - and the point of the quiz is only automatic relies on parsing by Oracle only supports arrays of account that is QUESTIONED.

    The tables that are affected by DML not a query as an update do not figure in automatic invalidation of a cache.

    I was hoping that the explanations given in the questionnaire itself would not lead to a thread - rather it would provide a pleasant and clear answer. So feel free to let me know if you think otherwise.

    As to why Oracle would let you include DML not a query inside a function of caching of result, well... I can easily accept that you shouldn't do this - in general. But I don't see that we should make it impossible. It would probably be a good candidate for an another PLW (PL/SQL warning), as in:

    "Non-requetes DML in a result caching function will not affect caching and can result in unexpected results."

  • Want to Elimate 'SYS. ODCIVARCHAR2LIST"by the result of query

    Hello

    Oracle Version installed is 11.0.2r6. I have a dummy table with data as below:

    STID ADDRESS Type_de_fichier
    -------- ------------------ ----------------
    SALES of ABC 9927 has 0
    TRANSFER of XYZ 9927 b 0
    TRANSFER of ABC 9927 has 0
    TRANSFER of XYZ 9927 b 0

    I want that the output voltage:

    STID ADDRESS Type_de_fichier
    -------- ------------------ ----------------
    9927-0 ABC SALES, TRANSFER
    TRANSFER of XYZ 9927 b 0

    I used 2 methods to achieve the same result, but face some problems.

    Method 1:
    --------------
    SELECT STID, ADDRESS, LISTAGG (File_Type, ',') within THE GROUP (ORDER BY Type_de_fichier) AS file_type
    MODELING
    STID GROUP, ADDRESS;

    I got the output as:

    STID ADDRESS Type_de_fichier
    -------- ------------------ ----------------
    9927-0 ABC SALES, TRANSFER
    9927b 0 XYZ, TRANSFER

    Method 2:
    -------------
    SELECT STID,
    ADDRESS,
    CAST (COLLECT (SEPARATE File_Type) AS SYS. ODCIVARCHAR2LIST) AS File_Type
    FROM (SELECT STID, ADDRESS, MODEL Type_de_fichier)
    STID GROUP, ADDRESS;

    I got the output as:

    STID ADDRESS Type_de_fichier
    -------- ------------------ ----------------
    9927-0 ABC SYS. ODCIVARCHAR2LIST (SALES, TRANSFER)
    9927b 0 XYZ SYS. ODCIVARCHAR2LIST (TRANSFER)

    Same method 2 gave good result which I like, "SYS. ODCIVARCHAR2LIST"is coming as a prefix in the result. I tried to use the replace, but it does not work. I tried to use the "wm_concat" method, but it does not work.

    Can someone help me please to get there? I want a simple Select statement, not the functions/procedures etc.

    Thank you
    Stéphane.

    And what about:

    SELECT STID, ADDRESS, LISTAGG(File_Type, ',') WITHIN GROUP (ORDER BY File_Type) AS file_type
    FROM (
         SELECT DISTINCT STID, ADDRESS, File_Type
         FROM DUMMY
         )
    GROUP BY STID, ADDRESS;
    
  • To access the results of query XML MSSQL



    I use MS SQL Server with a query of the form: SELECT * FROM tablename FOR XML AUTO [, XMLDATA]
    (The brackets above to indicate optional use of the XMLDATA option and are not explicit)
    I'm capable of outputting the result in passing the name of the query to CFDUMP so I know that the SQL statement returns the correct information. However, I want to store the XML in a string variable, in the end to go to XMLParse (for example).

    How to access the ResultSet? Columns in the table are not relevant in the case of XML output.

    Nevermind, sorted it.

    For anyone interested, the answer is that the query can be serialized to a string via CFWDDX.

  • calculate a box and put the result in another

    I am trying to get the multiple of a decimal box so for example

    Box1 will be number 100

    You then have to tick a box to multiply

    Box2 will store the answer

    I have the following, but it does not work

    var topmostSubform.IFFPage6.Page.FirstCustomer.decApproxNetIncom.rawValue = Aprox

    Aprox = Aprox * 7

    topmostSubform.IFFPage9.Page.decFirstExpend.rawValue = Aprox

    * THIS CODE IS PLACED ON THE BUTTON MULTIPLY *.

    It is also a function of click I have another button that I want to do one divided by 12

    Any help would be great

    I fixed this by using the following:

    var currency = topmostSubform.IFFPage6.Page.FirstCustomer.decApproxExpend.rawValue * 7;

    var currency1 = topmostSubform.IFFPage6.Page.SecondCustomer.decApproxExpend.rawValue * 7;

    Currency2 var = topmostSubform.IFFPage6.Page.SecondCustomer.decJointApproxExpend.rawValue * 7;

    topmostSubform.IFFPage9.Page.decFirstExpend = currency;

    topmostSubform.IFFPage9.Page.SecondCustomer.decSecExpend = currency1;

    topmostSubform.IFFPage9.Page.decJointExpend = currency2;

  • Display of the results of query in Excel on the Web

    Hello

    I try to display data from a query in excel on the web without creating an existing file. I know I can create a CSV using UTL_FILE and post it but I was hoping there was a way to do it without actually creating the file. I have a procedure that resembles

    PROCEDURE displayAsCSV is
    cursor STUD_CURS is
    Select * from students;

    BEGIN
    for STUD_REC loop STUD_CURS
    HTP. Print (' "' |") STUD_REC. FIRST_NAME. » " , " '|| STUD_REC. LAST_NAME. » " ');
    end loop;
    END;

    Anyone know if it is possible to display these results in excel in the browser by altering the MIME types or something similar?

    Thank you

    Check Tom owa_sylk utility with the appropriate mime type.

  • In the results of query with consecutive Dates

    I have a table like this:

    volume of queue data_date
    01/09/01 2324, 353
    01/09/03 2324, 34
    2324 01/09/04 43
    2325 01/09/01 53
    01/09/02 2325, 66


    I want to have output like this:

    volume of queue data_date
    01/09/01 2324, 353
    * 2324 01/09/02 0 *.
    01/09/03 2324, 34
    2324 01/09/04 43
    2325 01/09/01 53
    01/09/02 2325, 66

    Note the filled in date 01/09/02.

    What I'm doing now is using a function table in select pipeline than iteratates the date of the execution of a statement range for each date and make a current output. A little slow, but faster than the old solution below.

    I also define operations using a single query that contains trade unions and disadvantages. This has proved to be slow.

    The only thing I have not tried is to have a stored proc popuate the value 0 for the missing date.

    Is there another way to do that is effective?

    I use a 10g database, but soon the data will be brought to a 11g.

    Welcome to the forums!

    I would say that one of the best ways on the latest versions of Oracle using the PARTITION OUTER JOIN.

    See the following link for examples/explanation: partition outer join in oracle 10 g

  • Dependent on the value of query column names

    Hi guys, I don't think this is possible, but I thought I'd give it a go.

    I am wanting to values that are returned by my query as column headings. For example:

    SELECT 1,2,3,4,5
    OF trade_table
    WHERE < 6

    The table contains 10 records, "A1", "B1", "C1", "D1", "E1", "F1" etc... and my query returns 5 records of each with a rating of 1 to 5. The first record in the standings, lets say "D1" must be the column heading.

    I'm extremely sorry for being vague, but my request first contains a lot of analytical functions and I try to simplify it.

    Thanks in advance.

    To do this with the reporting you tool use and not with SQL and PL/SQL.

  • JavaScript is not called by the process of PL/SQL

    Hello Experts

    I try to call a javascript function from pl/sql using htp.p process, but javascript does not get mentioned. In fact, my requirement is as follows:-

    I have a report with check boxes. I use apex_application.g_X01.count to loop through the boxes and check the values of the report. If all of the checkboxes are selected, then I want to show a confirmation box so that the user can confirm that they want to go ahead and do the follow-up actions.

    My Javascript function that I placed it in the HTML header and the Body attribute is:-

    function confirm_response()
    {
    var answer = confirm ("test", "Confirm");
    If (response)
    {
    $x('P1_FLAG').value = 'Y ';
    }

    }

    Looks like my pl/sql process, which currently is trying to evoke the javascript: -.

    Start
    IF apex_application.g_f01.count = < < a number > > THEN
    HTP. P ("< script type =" text/javascript"> ');
    HTP. P ('confirm_response()');
    HTP. P ("< /script >" ");
    IF: P1_FLAG = 'Y' THEN
    -Continue with follow-up actions
    ON THE OTHER
    -To get out the process of
    END IF;
    END IF;

    end;

    But when I run the present that it does not work. The confirmation box never appears.

    It does not even if I change the PL/SQL process as below: -.


    Start
    HTP. P ("< script type =" text/javascript"> ');
    HTP. P ('confirm_response()');
    HTP. P ("< /script >" ");
    end;

    Can someone please advice.

    Thank you

    Hello
    >
    It does not meet my needs because I want first of all check if all the boxes are ticked, then only run javascript.
    >

    So how count the boxes checked in JS is the question.

    Continuing to your operation code snippet, you have box f01.

    Modify the script in the HTML header to this

    
    

    See you soon,.

  • call run params in the taskflow with the results of the previous run

    I have a requirement to call the executeParams on the object from a point of view after the execution of the executeparams on another display object in a taskflow. I'm able to pass the variable to the view object binding 1 of taskflow input parameters. But variables bind to the view of the second depends on the results (current line, it returns only one row) execution of view 1st in the taskflow.

    How to bind to the 2nd display performance variables in the taskflow according to the results of enforcement of 1 view. The second point of view expects 2 parameters of the current line of the 1st viewiterator.

    Taskflow definition:

    ----------------------

    executeWithParams1stView-> executeParams2ndView-> .jsff


    The page definition for the second executewithParams with links, I configured. But the following returns no results of the 2nd iterator. But if I pass values hardcoded for the NDValue I get the correct results.


    < action IterBinding = "AgencyPoliciesIterator" id = "ExecuteWithParams" RequiresUpdateModel = "true" Action = "executeWithParams" >
    < NamedData NDName = "bPolicyNum".
    NDValue = "${data.renewal_policyterm_taskflow_renewal_policyterm_taskflow_ExecuteWithParamsPageDef.PolicyNum.inputValue}" "
    NDType="oracle.jbo.domain.Number"/ >
    < NamedData NDName = "bAgencyNum".
    NDValue = "${data.renewal_policyterm_taskflow_renewal_policyterm_taskflow_ExecuteWithParamsPageDef.AgencyNum.inputValue}" "
    NDType="oracle.jbo.domain.Number"/ >
    < / action >


    Thank you and best regards,

    S R Prasad

    Published by: oumar s Prasad on November 10, 2010 13:36

    Hello

    I don't know exactly what the problem with your application, but maybe you could try to create a method in the application module impl.
    If I understand correctly, you must run the firstVO as soon as the taskFlow is called and based on the line returned by one, run the secondVO.

    You can do this with a method in the ApplicationModuleImpl. I created an example:

    public void executeViewObjects(Number managerId){
        if(managerId!=null){
          getDepartments1().setNamedWhereClauseParam("inManagerId", managerId);
          getDepartments1().executeQuery();
          Row dep=getDepartments1().first();
          if(dep!=null){
            Number departmentId=(Number)dep.getAttribute("DepartmentId");
            getEmployees1().setNamedWhereClauseParam("inDepartmentId", departmentId);
            getEmployees1().executeQuery();
          }
        }
      }
    

    If you expose this method and drop in your taskFlow you can map it is the input of the taskFlow parameter input parameter.

    Gabriel.

  • With Firefox 9.0.1 an application using a JavaScript confirm command does not display the message. Blocker is disabled for the domain of the application.

    Application is written in php and javascript. Clicking a button triggers a javascript confirm dialogue. Since upgrading to Firefox 9.0.1 confirmation dialog box does not appear. Trainer first set to allow the full domain of the application, then off altogether. JavaScript is enabled.

    It turns out that Firefox has become a little more picky about the standards that IE. (Imagine that!) Code created the entries of type = 'text' hidden, then calls a javascript function and the values passed in the entries hidden as parameters. The original code just pass the name of the entry as a variable. Then, the Firefox console complained that the variable was not declared. Once I spent the variable.value, then the error disappeared, Firefox has been happy, does not break IE, so I'm happy.

  • Pass the value of form field into the message of confirmation box

    Hello

    I created a confirmation box that fires when a user presses a button on the form.

    Under "URL redirection" button, I have the following:

    JavaScript:confirmDelete('Please_Confirm_Reduction_of_Call_Off_Pick_requirement.','REDUCE_CALL_OFF');

    This in turn calls a PLSQL process that perform a database update for a form called P4_PICK_LINE text field

    Is that I would have to include the P4_PICK_LINE in the confirmation message, i.e. "Please confirm reduction of call off sampling requirement pick123' where pick123 is the value of P4_PICK_LINE

    I know that I can pass in variables like session & APP_USER. etc in the message of confirmation, but not sure about text form element values.

    I use the apex 4.0.0.00.46 on windows version 7.

    Any help would be great


    Thank you
    Chris

    Edited by: Cashy on 05-Sep-2012 03:44
    javascript:confirmDelete('Please confirm reduction of call off pick requirement ' + $v('P4_PICK_LINE'),'REDUCE_CALL_OFF');
    

    A complete list of javascript API functions can be found here: http://docs.oracle.com/cd/E10513_01/doc/apirefs.310/e12855/javascript_api.htm

    You may not use session variables unless your variables are sent to the server. As long as you don't offer you will rely on javascript ;)

    Concerning

    Nico

  • Have the drop-down list boxes become visible depending on the selection in a previous drop-down list box?

    Hi, im doing a form that only shows some options based on the previous selections.

    So far I have buttons which allow a user to select a specific product, and then by using the drop-down combo boxes select some optional features.

    I then have a simple javascript code that bears the name of a product at a price (i.e. the user selects product 'A', the review sections shows priced at $ 99).

    My problem is with additional customization options that depend on previous choices.

    Is it possible to have some drop-down list boxes become visible depending on the selection in a previous drop-down list box? If yes how could I impliment it?

    Currently my best idea is to have a button that could ask the user if he or she had previously chosen a certain selection and then reveal areas of correct drop-down list accordingly.

    Thank you

    Hello

    With a small change I think that the code works as expected. I changed your mainDD.value to event.value, as on the validate event the mainDD.value property cannot be updated as expected.

    script

    this.getField("Dropdown2").display = display.hidden;

    this.getField("Dropdown3").display = display.hidden;

    this.getField("Dropdown4").display = display.hidden;

    Switch (event.value)

    {

    case "a":

    this.getField("Dropdown2").display = display.visible;

    break;

    case "b":

    this.getField("Dropdown3").display = display.visible;

    break;

    case 'c ':

    this.getField("Dropdown4").display = display.visible;

    break;

    by default:

    break;

    }

    end of script

    Hope this helps

    Malcolm

Maybe you are looking for