return two values of columns via Javascript

For the same purpose as:

OnClick = "$s ('P1_DEPTNO', #DEPTNO #); return false; »

to return a value from column via javascript, is it possible to return 2 values? Example:

OnClick = "$s ('P1_DEPTNO', #DEPTNO #); $s ('P1_EMP, #EMPLOYEE #); return false; »

Thank you all :)

Max

Maxime Carrier wrote:
Sorry for the wrong question form, I'm not an English speaker, so I try my best to make sentences clear.

My goal is like this in this issue: Insert the value of a column in the report in a page with JavaScript element - 2?

My Apex version is: 4.0.2.00.06
My DB is: Oracle 11G
My browser: IE 7

I'm trying to save two values when I click on a link in a report. I will use these values in which the declaration of another report. The content of the second report will depend on the link I clicked in the 1st. It will change dynamically without reloading the entire page.

Standard or interactive report?

Where is the defined link? Column link IR? The column link? HTML embedded in the report query?

One of the two values is not a number.

Use quotes around chains of substitution of the column as shown above.

Tags: Database

Similar Questions

  • Retrieve two values of column in a table

    Hi I want to retrieve two values of column in a table and store the values as a single column value in another table... How to do with it?

    Use in this way:
    Insert in tab2 (col1) select col1 | col2 from tab1;

  • How to return two values of a function?

    Hi all
    I have a function which returns a varchar2 value. This value is used in the SQL of a ref cursor

    Now I want this function returns two values. I tried to use varray, but could not accomplish the task.

    Can you tell me how can I find the two values from a function? and how this function can be called in a SQL query?

    Thank you very much

    The query should look like:

    SELECT v.col.name AS name
         , v.col.flag AS flag
    FROM   ( SELECT kk_test_kk(t.somecolumn,t.someothercolumn,42) AS col
             FROM   sometable t ) v;
    

    Note that you need to prefix with the name of view inline ('v' in the example) and the expression of the function ('col' in the example).

  • Returns the value of column line

    Greetings!  I currently have a request we will tell

    SELECT value, period FROM MAS_CFUS_KEYACM_CONTROLDATA ORDER BY cf_keyword_ID

    RESULTS

    Period value

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

    100.0002 1 JANUARY 14

    -35.68 1 DECEMBER 14

    -1943.67 NOVEMBER 1, 14

    678.0013 OCTOBER 1, 14

    This continues for about 15 results by cf_keyword_ID.

    I'm looking to return the VALUE first in a new column called PREV1, the second value of PREV2, third in PREV3 and so on.  The same goes for the dates.  And all this for only the first 10 values of each cf_keyword_ID.  Can anyone suggest the best way to achieve this?

    Thank you!!

    Hello

    This is called pivoting.  Because I don't have a copy of your table test, I'll use scott.emp to illustrate.

    This shows the first 3 employees for each job, in order by hiredate, along with their hiredates:

    WITH relevant_data AS

    (

    SELECT ename, job, hiredate

    row_number () taken OVER (PARTITION OF work

    ORDER BY hiredate

    ) AS r_num

    FROM scott.emp

    )

    SELECT *.

    OF relevant_data

    PIVOT (MIN (ename) AS ename

    MIN (hiredate) AS hiredate

    FOR r_num (1, 2, 3)

    )

    ORDER BY job

    ;

    Output:

    WORK 1_ENAME 1_HIREDATE 2_ENAME 2_HIREDATE 3_ENAME 3_HIREDATE

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

    ANALYST FORD 3 December 1981 SCOTT April 19, 1987

    The CLERK SMITH December 17, 1980, 3 December 1981 JAMES MILLER January 23, 1982

    MANAGER JONES 2 April 1981 BLAKE 1 May 1981 CLARK June 9, 1981

    PRESIDENT KING November 17, 1981

    SELLER ALLEN 20 February 1981 WARD 22 February 1981 TURNER 08-Sep-1981

    There are actually more than 3 SECRETARIES and SALESMEN.  Which does not cause an error; the only first 3 are shown.

    As you can see, having less of 3 does not cause any errors, either.

    For more info on pivots, see the FAQ of the Forum:

    Re: 4. How can I convert rows to columns?

    I hope that answers your question.

    If this isn't the case, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.

    Explain, using specific examples, how you get these results from these data.

    If yod post rather a problem using scott.emp, then you need not display the sample data; just results and explanations.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum:

    Re: 2. How can I ask a question in the forums?

  • Question by passing the value of the report column via javascript

    I'm going through #COL05 # to P28_CREATIVE_URL using the following javascript code. I got this Oracle documentation example, but it does not work for me. The status bar shows me that #COL05 # is recognized correctly, so it might be in the... opener.document.

    PAGE
    Function and Global Variable declaration:
    function passback (passVal1)
    {
    opener.document.getElementById("P28_CREATIVE_URL").value = passVal1;
    Close();
    }

    Column attribute
    The column link
    URL:
    JavaScript:passback(#COL05#);

    Use instead of single quotes

    javascript:passback('#COL05#');
    
  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • Is it possible to return the largest (highest) value in a range of values (not only the higher of the two values)?

    HI -.

    waiting for the Maximum()< x >, < y >) function to have the ability to determine the largest more of two values.

    EG - Maximum()< x > < y >, < z >)

    Is there another way to do this (without a custom function)?

    Thank you, James.

    With independent attributes (i.e. X, Y and Z are not the values of the attribute even through a set of entities), each attribute must be explicitly referenced and the simplest solution is to nest calls to competition.
    For example: Maximum (, Maximum (,))

    Do the same with an arbitrary number of values of attributes associated with the same entity (i.e. 'age in years' as an attribute of 'person') you can use the InstanceMaximum or equivalents of natural language that returns more high/more recent value of an attribute from entity level all instances of the entity.

    InstanceMaximum (, )

    who is the most recent for all [of]

    who is the greatest for all [of]

    last of all for

    the largest of for (all of | all | )

    There are also the following to constrain the set of instances of entity to a subset based on a condition and get the most out of this subset (i.e. ' age where the person is a woman')

    InstanceMaximumIf (, , )

    who is the most recent for all [of] for which it is true that

    who is the greatest for all [of] for which it is true that

    the largest of for (all of | all | ) for which it is true that


    A similar feature exists for at least and the sum.  See the Guide to political use of automation for details and examples.

  • To hide multiple items via javascript or actions in case of different variable values - how?

    Note: I'm still Captivate 8

    The Question has 2 parts:

    (1) is there a possibility to hide (or show) of the elements via javascript instead of shares advanced? I think it would be a much faster workflow. I think of something as

    If variable1 < = 100 screenx.elemeta.hide;

    If variable1 < = 90 screenx.elemetb.hide.

    If variable1 < = 80 screenx.elemetc.hide;

    If variable1 < = 70 screenx.elemetd.hide;

    (2) if it is not possible... OK, I use advanced actions. But there is the 2nd problem: it runs only the first part of it when exporting in HTML5.

    See photo. I try to hide - or no - hide the 9 elements in case of different values in a Variable. Lets say that the value is "7". In se9 is Laura if the value is less than or equal 9 to hide the element ausw_se_10. This method works. In se8 is asket if the value is less than or equal 8 in order to hide the element ausw_se_09 - what you see in the image. This and the following mask does not work. I'm doing something wrong or is this a bug? And is there a solution?

    sc_2015_10_16_erweiterte_aktionen.jpg

    Showing and hiding are a relatively easy control if you use HTML5:

    CP. Hide ("element_name");

    If you want to hide as much as you describe, you would need a very strict naming convention and use a loop to hide items.

  • How to exchange the two values in the same column by using the UPDATE?

    Hi all

    I have a table named TEST, and it has a column called A.

    and has values as follows:

    A
    ------
    10
    20
    30
    40
    50

    My question is how to move '10' instead of '20' and '20' instead of '10' in the column? This permutation is only for the first two values (10, 20)

    Note: Must be only in SQL, not in PLSQL.

    Any advice?

    Thanks in advance?

    Update
    test
    the value a = decode(a,10,20,20,10,a);

    Alexander gelin
    http://nimishgarg.blogspot.com/

  • return the names of columns which line values are not null.

    Hi I m a new db admin guy, and I need a sql script that should return the names of columns of the given table. and the returned column must be the value (fyi - if the column contains the value null column name would not come to the o/p of sql).
    Exmple:
    name of the table - A
    fresh status s.no name brand
    1 null aa 45P
    paid 2 null bb 30
    3 cc paid 35P

    (FYI - 1) if I give the table name (A) and s. n. (2) o/p should be - name, mark.
    (2) if I give the status of tablename (A) and s. n (1) the o/p should be - name, brand.

    Thank you
    Krishna.

    Published by: user13294228 on June 14, 2010 22:54

    BTW,
    The previous solution is for all values of the column, if you want a specific line, you can add it in where clause.
    I mean in your example, it you look like:

    SET serveroutput on;
    
    DECLARE
       l_cnt          NUMBER;
       l_str          VARCHAR2 (255) := '';
       l_table_name   VARCHAR2 (255) := 'YOUR_TABLE_NAME';
       l_col_cond     VARCHAR2 (255) := 'S_NO';
       l_val          NUMBER         := 1;
    
       CURSOR c_col
       IS
          SELECT column_name
            FROM user_tab_columns
           WHERE table_name = l_table_name;
    BEGIN
       FOR i IN c_col
       LOOP
          EXECUTE IMMEDIATE    'SELECT COUNT ('
                            || i.column_name
                            || ') FROM '
                            || l_table_name
                            || ' WHERE '
                            || l_col_cond
                            || ' = '
                            || l_val
                       INTO l_cnt;
    
          l_str := l_str || CASE
                      WHEN l_cnt = 0
                         THEN ''
                      ELSE i.column_name
                   END || ',';
       END LOOP;
    
       l_str := SUBSTR (l_str, 1, LENGTH (l_str) - 1);
       DBMS_OUTPUT.put_line (l_str);
    END;
    

    Saad,

    Published by: S.Nayef on June 15, 2010 11:54

  • Multiplies two values of two different columns and display in cold fusion!

    Hi all

    I have a table book_sale
    Topic | quantity | rate
    ===================
    Science | 5. $25.00
    Mathematics | 7. $70.00
    Reading | 20. $2.30
    ==========================================================
    I tried to code
    < cfquery name = "get_saleamount" datasource = "Book" >
    Select the object, the quantities, rates
    of book_sale
    < / cfquery >

    < table >
    < b >
    < /Th > < th > topic
    < /Th > < th > quantity
    < /Th > < th > rates
    Proceeds from the sale of < /th > < th >
    < /tr >
    < cfloop query = "get_saleamount."
    < b >
    < td > #Subject # < table >
    < td > #Quantity # < table >
    < td > #Rate # < table >
    < td > #Quantity # * #Rate # < table >
    < /tr >
    < / cfloop >
    < /table >

    The multiplication operation did not work code above. I want to calculate sale_amount = quantity * note and display the results in a table. Please give me some advice how to multiply two values from database and display them in a table above. Thanks in advance.




    If you want to exit, then simply change your
    #Quantity # * #Rate #.
    TO
    #Quantity * rate #.

    but you can do it at the level of the database, if you have db (most do so):

    Select the object, the quantities, rates, (amount * rate) AS ttl_cost
    of book_sale

    ...


    #Subject #.
    #Quantity #.
    #Rate #.
    #ttl_cost #.

    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com/

  • Ask the values of the Variable JavaScript to a Web site

    I have a local device that displays data from device via a browser status. If I open a browser, go to the address of the local device and open the console, I can access the status variables of the material by typing "answer [x]", where x represents a position in a table. This command returns the value of a given variable. I would like to have access to these variables in Labview so I can include the status of the device in my front panel. There is no documentation for other ways to communicate with this piece of hardware.

    Is there a way to Labview to load a Web site and open a console javascript with the website in order to request and data effectively monitor?

    I can't find anything useful to this end. thank you.

    -A

    For the URL of the POST VI, you put the ip address of the instrument. But since the javascript, it seems that the complete url includes/cmd/getalldata. So based on the addess ip in the screenshot, you may have to perform a "192.168.50.50/cmd/getalldata" as the URL.

    Also, it seems to POST data you just enter the string 'getalldata' in VI. You should look at the headers of the messages in Chrome Post see that PUBLISH data JavaScript code is actually sending.

  • change the color of line based on the value of column 5 Apex in the classic report

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Hello

    I know this question has been asked several times here, but I'm working on 5 Apex and need to know the correct way to do it in this version.

    I need to change the color of the text of the entire line (no background color) based on the value in one of the columns of the classic report. I have just two conditions, if the value of column = Yes, color should be red, otherwise it must be green.

    I am new to jscript and css, so appreciate if someone can tell me the solution with steps.

    I have already checked this link that changes the value of the column, need to do something similar to the whole line.

    https://tylermuth.WordPress.com/2007/12/01/conditional-column-formatting-in-apex/

    Hi coolmaddy007-Oracle,.

    Here's an example set up on the apex.oracle.com according to the specifications you gave: https://apex.oracle.com/pls/apex/f?p=35467:1

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Here is how it is done:

    Create a dynamic action with the following specifications:

    Name: Give the appropriate name

    Event: After refresh

    Selection type: region

    Region: select your region classic report

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $('td[headers="JOB"]').each(function() {
      if ( $(this).text() === 'MANAGER' ) {
        $(this).closest('tr').find('td').css({"color":"red"});
      }
      if ( $(this).text() === 'SALESMAN' ) {
        $(this).closest('tr').find('td').css({"color":"green"});
      }
      if ( $(this).text() === 'CLERK' ) {
        $(this).closest('tr').find('td').css({"color":"blue"});
      }
    });
    

    NOTE: Download the selector appropriate for your knowledge $('td[headers="JOB"]') case using firebug/browser development tools.

    Items concerned: leave blank.

    PS: Changed the example to change the color of text instead of the background color.

    I hope this helps!

    Kind regards

    Kiran

  • Hanging in the updating of the IRR via Javascript

    Apex: 4.2.2.00.11

    I have an IRR that has a checkbox column. Checking the box either includes or excludes this specific row when the page is sent.

    I add a 'global' checkbox in the column header of the IRR report for this column. It controls, checks all the boxes in this column to SORT. Unchecking the contrary fact. The "global" checkbox is a toggle power switch of the checkboxes in the SORT.

    So far so good. Works as expected.

    However, during the updating of the IRR (due to changes of order sorting, additional filters added, etc.), it redraws the region of apexir_DATA_PANEL - and with it, he repaints the table headers too. And this removes the "global" checkbox in the column header. (a page refresh is necessary to return to the "global" checkbox)

    I want to do is add a function call to the Manager of refreshment of the IRR - the last call to the handler is the custom function that adds the "global" checkbox in the column header. Something like:

    . Bind $(«#IRR_OBJECT_HERE») ("onchange", function() {}
    AddGlobalToggle(); Added the check box of the column header if there is
    });

    I tried many references to object (unless the IRR) and managers of events, but without success.

    Is it possible to connect refresh report string of the IRR via Javascript?

    Billy

    Requires as not simply a dynamic action after Refresh on the IR region?

  • How to get AFExecuteThisScript to return the value of Net.HTTP.request (asynchronous)?

    I have an Acrobat only plugin, developed in 2005 VS.  Originally with Acrobat 7 SDK, now updated to use Acrobat 9 SDK.  The ultimate goal of this feature is to open a PDF file from a web server Agile: If a user string, a URL is created, a request sent to the URL, then pay back the answer.  The answer can be either the PDF itself or a string path to the PDF file.  I thought it would be easier to use the version of PDF path to simply open the new PDF of the http:// address.

    I created a folder level javascript with a call to Net.HTTP.request confidence.  I have a script that works when invoked from a menu item added by the folder level javascript file.  But when you use this same command in my C++ with AFExecuteThisScript code, I can't get the HTTP response to finish pending in the code for the result.

    The Net.HTTP.request and the asynchronous callbacks confuse me, so maybe that's my big problem.  I could not Net.HTTP.request to return a value in a service simple javascript right now, I'm trying to use a "global" variable in the JavaScript folder level and two calls.  The first call "sets" the global variable, the other "becomes" it.  But this seems to be the issue.  When I have my code debugging or stop execution, the part of the response of the Net.HTTP.request is never called.  But when I left to go beyond this step with error recovery, the answer appears later.

    So how kick off of the Net.HTTP.request and be notified when it's over?  either in JavaScript or VC ++?

    Any help is appreciated.  Even if the best option is to stream the file from the web server to a local file and then open the (this is the option that I take in another tool that runs outside of Acrobat).

    Here's the code.

    Javascript controls at the level of the files (urls truncated for the post)

    var THE_PATH = '';
    
    function setTHE_PATH ( gURL ) {
        console.println('setTHE_PATH Begin');
        var params =
        {
            cVerb: 'GET',
            cURL: gURL,
            oHandler: 
                {
                    response: function( msg, uri, e)
                    {
                        console.println('response method: Setting Path');
                        THE_PATH = SOAP.stringFromStream( msg );
                        console.println('<<' + THE_PATH + '>>');
                    }
                }
        };
        console.println('URL: ' + params.cURL + '\n  oHandler: ' + params.oHandler );
        console.println('Path: ' + THE_PATH );
        var netResult = trustedNetHTTPrequest(params);
        console.println('setTHE_PATH End');
        return THE_PATH;
    };
    
    trustedNetHTTPrequest = app.trustedFunction( 
        function ( params ) {
            console.println('trustedNetHTTPrequest begin');
            app.beginPriv();
            var netResult = Net.HTTP.request( params );
            app.endPriv();
            console.println('trustedNetHTTPrequest end');
            return netResult;
        }
    );
    

    Added MenuItems with JavaScript at the folder level

    app.addMenuItem( { 
        cName: "mysetTHE_PATH", 
        cUser: "set THE_PATH", cParent: "Tools", 
        cExec: "setTHE_PATH('http://......&getURL=true');",
        nPos: 0 
    } );    
    
    app.addMenuItem( { 
        cName: "mygetTHE_PATH", 
        cUser: "get THE_PATH", cParent: "Tools", 
        cExec: "console.println( THE_PATH );",
        nPos: 0 
    } );   
    

    Here's the JavaScript Console output when you run these two commands:

    setTHE_PATH Begin
    URL: http://......&getURL=true
      oHandler: [object Object]
    Path: 
    trustedNetHTTPrequest begin
    trustedNetHTTPrequest end
    setTHE_PATH End
    response method: Setting Path
    <<https://......DesiredFilename.pdf>>
    

    Here is the function in the plugin C++, with additional measures to prove AFExecuteThisScript works here

    sprintf(jsScript, "testVal='%s';event.value = testVal;", strURL.c_str() );
    AFExecuteThisScript( aPdDoc, jsScript, &pReturnValue );
    // After this, pReturnValue is the passed-in URL, as expected.
    sprintf(jsScript, "setTHE_PATH('%s');event.value = 'Step 1 Worked!!';", strURL.c_str() );
    AFExecuteThisScript( aPdDoc, jsScript, &pReturnValue );
    // After this, pReturnValue is 'Step 1 Worked!!', as expected.
    sprintf(jsScript, "event.value = THE_PATH;", strURL.c_str() );
    AFExecuteThisScript( aPdDoc, jsScript, &pReturnValue );
    // After this, pReturnValue is NULL
    

    This is the JavaScript Console output when you run the commands using the plugin (mode debugger, to wait after step 1)

    setTHE_PATH Begin
    URL: http://......&getURL=true
      oHandler: [object Object]
    Path: 
    trustedNetHTTPrequest begin
    trustedNetHTTPrequest end
    setTHE_PATH End
    

    Note that he never gets to the part of the "method of response.

    Thank you!

    Tim James

    You need not limit yourself to the plugin API. The requests HTTP from C/C++ is a fairly common condition, just observe the restrictions in my answer.

Maybe you are looking for