Different value for the element on the page on different areas on the same page?

Hi all:

I use APEX 4.0.6 and I have a page with 4 regions and each of the region shows a classic report which SQL is very similar to the other:

for example

For region 1, the SQL looks like select * from history where status = 'A ';
For region 2, the SQL looks like select * from history where status = 'B ';.
For region 3, the SQL looks like select * from history where status = 'C ';
For region 4, SQL looks like select * from history where status = ';

To optimize database performance, I like to create a page element called p_status_value on this page and using the syntax of following link for the SQL statement for all 4 regions:

Select * from history where status =: p_status_value;

However, I need this page element value is dynamically change for each region:

For region 1, p_status_value = "A";
For region 2, p_status_value = 'B ';.
For region 3, p_status_value = 'C ';
For region 4, p_status_value = ';

Also, I need hide this element of the page on this page.

Can someone show me how to do this?

Thanks in advance!

Kevin

Published by: Kevin Zhang on May 10, 2011 13:03

Then I would have 4 regions, with each region report, create a box item in each area, called PXX_REGION_VALUE and then your request is:

select * from history where status = :PXX_status_value_X; (XX for page # and X for region #).. The database engine will crunch through the query and your dashboard will work fine..

Thank you,

Tony Miller
Webster, TX

If vegetable oil is made of vegetables, what is baby oil made of?

If this question is answered, please mark the thread as closed and assign points where earned..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

Tags: Database

Similar Questions

  • Multiple values for the same column in the columns of diffétent in the same row?

    Hi all
    I wonder how you can display different values for the same column in different columns on the same line. For example, using a CASE statement, I can:

    CASE WHEN CODE IN ('1 ', ' 3') THEN COUNT (ID) AS 'Y '.
    CASE WHEN CODE NOT IN ('1 ', am') THEN COUNT (ID) AS "N".

    Yes, that will produce two columns but will produce null values to empty and also two separate registers.


    Any ideas?

    Thank you

    Are you sure that this code works for you?

    Select ID
             ,CASE WHEN MODE_CODE IN ('1', '3') THEN COUNT( No) END as "Fulltime"
             ,CASE WHEN MODE_CODE NOT IN ('1', '3') THEN COUNT( No ) END  as "Other"
    From table
    group by ID
    

    I guess the code above fails because MODE_CODE is not in your group by?

    My suggestion would be to put the CASE in the COUNT:

    Select ID
             ,COUNT(CASE WHEN MODE_CODE IN ('1', '3') THEN No END) as "Fulltime"
             ,COUNT(CASE WHEN MODE_CODE NOT IN ('1', '3') THEN No END)  as "Other"
    From table
    group by ID
    

    CASE expressions return no. when the respective conditions are true and NULL otherwise.
    COUNTY will have non-null values.

  • With one of several rows with the same value for the same ID

    Hello

    I have this request:

    SELECT

    Count (case when EXISTS ())

    SELECT *.

    FROM business_log bl, su topic

    WHERE su.ID_SUBJECT = s.ID_SUBJECT

    and bl.id_subject = su.id_subject

    AND bl.value = 'resolved '.

    )

    then 1 end another null) num_solved

    OF THE subject

    It is possible that a subject is more than once 'resolved' in the table BUSINESS_LOG

    I want to count only one line solved for a topic.

    I need to use only under RESERVE the table in the main query due to other counts.

    Thank you very much.

    Concerning

    Milos

    Post edited by: 2796614

    in the examples before we talked abount 'Resolved' instead of 'resolved' as in your last example... to let you know, how it is stored.

    I had advice is not to use SEPARATE.

    So what... the evidence that any other question is faster than anything goes business_log, filter lines and can count distinct keys...

    separate within a group function is not the same thing as do select distinct...

    HTH

  • How can you specify the default value for the undefined array elements

    According to aid LV, the tables have two default values, the normal default value and the default value for the undefined array elements.

    I assume that there must be a way to specify the default value for later, but I can't find it anywhere.  Any ideas?

    I know that you can drag the item out of the table container.  Change the default value on this scalar element.  Then drag the item in table tank.

  • Sales order form, line status code is displayed as "WITHDRAWN". but the same code appears as "AWAITING_SHIPPING" for the same line in the database. can you please explain, where the value in frontend comes? It differs from the flow_status_code in oe_or

    Sales order form, line status code is displayed as "WITHDRAWN". but the same code appears as "AWAITING_SHIPPING" for the same line in the database.

    Where the value in the frontend is filling?

    It differs from the flow_status_code in oe_order_lines_all?

    Thanks for the correction.

    He slipped right out of my mind!

    Here is a detailed explanation of this case:

    Status of orders picked and picked partial

    Kind regards

    Bashar

  • Is there a default value for the color management in PSE10? Beautiful photos from iPhoto, but blur with elements. I need help with this before as I consider that the upgrade to PSE13 and beyond.

    Is there a default value for the color management in PSE10? Beautiful photos from iPhoto, but blur with elements. I need help with this before as I consider that the upgrade to PSE13 and beyond.

    Printing which forms an angle seems ok, but one that is horizontally seems faded, incomplete.

    I was wondering if I saved a layer somewhere and set it as a default value.

    If you group the layers, you will be left with a single layer, thus spreading your concern.

    Suggest that you do the following:

    1. Make sure you have the latest drivers for your printers
    2. Reset the default preferences.

    Hold the Alt, Ctrl + Shift keys when you click the icon to open the items. When asked if you want to delete the settings file, say Yes.

    Items nearby and let regenerate the file.

  • Default value for the select list of type of form elements

    Hello

    I do not work with Apex that mutch, so this may be a simple question... but I still need help.
    I have a form, in this form, I have a question P19_ONTVANGER_ID, this is based on a LOV.
    This LOV is on a table that has a field of username with the value of APP_USER.
    The table looks like:
    ONTVANGER_ID this is the PK and is going to be the return value from the LOV.
    NAME is the display value for the LOV.
    USERID is the column APP_USER.

    What users would like to get is that if they create a new record, the default value for the P19_ONTVANGER_ID field is their own ONTVANGER_ID.
    But they must also be able to select another user.

    hope there is someone out there that can and will help me.

    Kind regards

    Rob

    APEX 4.0.2 Oracle 10

    Rob-v-M-Gn-Nl wrote:
    Until now, I had, but I need to select the value of the id of the table and the list of selection item appears the corresponding value.

    How can I do this?

    You can select the Type of default value as the body of the PL/SQL function

    and to add something like that

    declare
    v_return number;
    begin
      select your_id
        into v_return
      from your_table
      where some_column = :APP_USER;
     return v_return;
    exception when no_data_found then
     return null;
    end;
    

    http://www.asktheoracle.NET/PLSQL-function.html

  • Best way to set the default values for the form elements

    Hello

    I have a form with a lot of defaults that is mentioned below...
      Field                      value  
      created by             :APPL_USER
      creation_date         SYSDATE
      last_updated_by     :APPL_USER
      last_update_date    SYSDATE
      item1                     value1
      item2                     value2
    I am currently using calculation-> after presents... then when we create/update a record... these computaion takes place and the default value for the inserted values get... THIS WORKS PERFECTLY WELL.

    I want to know... If this approach is fine OR we can have a better approach to achieve...?

    Thank you
    Deepak

    Hello

    I think it's good if it fits your need.

    But why you have these fields in the form?
    created by: APPL_USER
    CREATION_DATE SYSDATE
    last_updated_by: APPL_USER
    last_update_date SYSDATE

    The user can enter the ones?
    I thought that those who are to audit and I would fill those drop with trigger in the database.
    So that you get the same "correct" values if you need to manipulate the data with example of sql client

    BR, Jari

  • How to add the default value for the "Full - Text Search" box

    Hi all

    I am looking for the ability to add a default value for the "Full text search" box in the search form.

    Example:

    When the user accesses the search page it get default values for some fields (defined in the rule as default values) such as

    xField1 = txt1 and xFiel2 = txt2.

    and Furthermore we need full-text = Hello world.

    Is this possible?

    Another way that we use is to open the search by URL with coreContentOnly = 1 as a form:

    http:// < Server >/cs/idcplg? IdcService = GET_DOC_PAGE & to Action = GetTemplatePage & to Page = STANDARD_QUERY_PAGE & coreContentOnly = 1 & to xField1 = txt1 & to xFiel2 = txt2

    It is possible to add full-text criteria here? Somethig like: & text = Hello World

    Thank you

    Leon

    It is not possible in a very obvious way, not to mention that it is a rather strange request.  I can't really imagine a realistic use for this case.

    Anyway, without a messy customization, you should provide a default query with an FTX inside element text setting (i.e. "IdcService = GET_DOC_PAGE & Action = GetTemplatePage & Page = STANDARD_QUERY_PAGE & QueryText =Hello World" "")

    To do this in a profile in the secondary effects of the profile section, add the following:

    <$dpPromote("QueryText",>Hello everyone") $>.

  • Create a default value for the record button on

    Hi all

    Help me on what follows.

    I have region with user name. I want to when I create a username it will automatically sets the value for the status to 'active '.
    As I have status field in the table.

    Thanks in advance

    If the status is a Page element, you can set the default value. If this isn't the case, you can have a base table, the default value of this column status.

    alter table t1 modify status varchar2(6) default 'Active';
    

    Tarraf

  • Set a style different cases for the same placeholder (data fusion) used two times in the same text

    Hello.

    I have a document with some parties updated with the fusion of data (via placeholders). Is it possible to set a style of different cases for the same placeholder in the same text. See the example:

    Mike runs its < < vehicule_placeholder > > in the city. But its < < VEHICULE_PLACEHOLDER > > is meant to be shared.

    If the value of this placeholder in the file merger is 'bike', the sentence should be:

    Mike runs his bike in the city. But his BIKE is meant to be shared.

    Is this possible? How?

    Thank you.

    You can do it. A character style for this configuration placeholder text, set in all caps.

  • different values on the same grouping column

    Hi all

    I have a requirement to find different recordings of the same grouping columns have value different values in the columns, for example:

    WITH

    Data (G1, COL)

    AS

    (

    SELECT 'A', '456' FROM dual UNION ALL

    SELECT 'A', '345' FROM dual UNION ALL

    SELECT 'A', ' ' FROM dual UNION ALL

    SELECT ' 'B, 123' FROM dual UNION ALL.

    SELECT ' 'B, 123' FROM dual UNION ALL.

    SELECT ' 'B, 123' FROM dual UNION ALL.

    SELECT 'C', "789' FROM dual UNION ALL

    SELECT 'C', "789' FROM dual UNION ALL

    SELECT 'C', "" the DOUBLE

    )

    Select g1, pass data

    Ideally for G1 = A, the NECK should have that a single value across records ' 456 'or ' 345'. So I need to check the values in NOT NULL of the COL where, for any value of G1, we have different values of the colonel G1 = 'B' is perfectly fine, so I don't need. G1 = C is good too and I'm not worried about it. I only need these entries when the neck was non-empty value / NULL not different for the same value of G1.

    So expected out put is

    Capture.PNG

    WITH

    Data (G1, COL)

    AS

    (

    SELECT 'A', '456' FROM dual UNION ALL

    SELECT 'A', '345' FROM dual UNION ALL

    SELECT 'A', "double UNION ALL

    SELECT ' 'B, 123' FROM dual UNION ALL.

    SELECT ' 'B, 123' FROM dual UNION ALL.

    SELECT ' 'B, 123' FROM dual UNION ALL.

    SELECT 'C', "789' FROM dual UNION ALL

    SELECT 'C', "789' FROM dual UNION ALL

    SELECT 'C', "the DOUBLE

    )

    Select g1,

    Col

    de)

    Select g1,

    Col,

    Count (distinct trim (col)) at the NTC (g1 partition)

    from the data

    )

    where NTC! = 1

    and trim (col) is not null

    /

    G COL. NO.
    - ---
    A 345
    A 456

    SQL >

    SY.

  • Essbase Warning (1023135) skip certain values for the replication

    Hello

    When you replicate the complete data of a partition Essbase BSO in Essbase ASO (11.1.2.2),
    thousands of warning messages are logged in the application log:

    "Warning (1023135) skip certain values for the replication.

    The partition (data of level 0) valid and the counties of cells in each area are exactly.

    No idea of the possible causes and consequences?

    Thanks for your help.

    Philippe Cuisset

    Hello

    Thanks to the contributors.

    The contours of the source and the corresponding target, with the exception of 3 members with different names in the source and target.
    My score has 2 spaces for these 3 members. Mapping advanced between the names of source and target members has been set in a field, but it was missing in the other (not detected by the validation of the partition!). I don't set it too and now no more warnings.

    Philippe Cuisset

  • When you create a PDF from a scanner, is there a way to set the default value for the size of 8.5 x 11 letter custom every time I make a PDF from a scanner?

    When you create a PDF from a scanner, is there a way to set the default value for the size of 8.5 x 11 letter custom every time I make a PDF from a scanner?

    Hi kevin7frg,

    You can go to "file > create > scanner > configure presets PDF»

    The dialog box that appears, you can choose 8.5 X 11 as the default width and height of PDF pages to scan.

    Hope that helps.

    Kind regards

    Ana Maria

  • Syntax to set a default value for the metadata of Web site field

    In my profile, I have a rule where I did the infoOnly metadata xWebSites field and define a default value like this:

    < $dprDefaultValue = # active.xWebSites$ >

    Y at - it something I am doing wrong? Incorrect syntax?

    Thank you!!

    I found this in the documentation of the Site Studio:

    "To identify the ID of an article or a website, open the page to check content on the content server and click Browse next to the"Section of the Web Site." In the window choose the Web Site Section, select your Web site and notice the ID in brackets next to each section (Figure). »

    Can I set the default value for the ID?

  • DEU-00014: invalid value for the setting, "include".

    Hi, I need to do an export of paintings from a schema and a particular query executed will apply to all the specified tables in "INCLUDE = TABLE: '('TBL1', 'TBL2') IN' in the command expdp.»

    Now, I get the question in this setting INCLUDE. I have about 200 paintings to be included and I add this parameter INCLUDE in a separate parameter with all table names 200 file in Informatics and with the help of this parameter file in the expdp command.

    Error message I get:
    DEU-00014: invalid value for the setting, "include".

    When I use the same process for 2 tables, this works very well. I think that there is a limit to the number of characters that can be used in the INCLUDE parameter. If so, then how do I use expdp to select only those 200 tables of 500 paintings in my diagram. I'd appreciate any help on this. Thank you.

    Hello

    I'm sure that the limit is 4000 characters, but there are fairly simple workaround.

    Create the table my_tabs (a varchar2 (30));
    insert into my_tabs values ('your_table_name');
    Repeat this step for each of your 200 tables

    include = TABLE: "in ((SELECT from MY_TABS)) '"

    You may need to mess you with the quote, but the value you were using is just an expression. It is only by using a different expression.

    Dean

Maybe you are looking for