How to store the values of variable level OBIEE presentation in DB

Hi all!

We have a command prompt of dashboard which is set up to store values in variables of presentation (period start and period end dates). Is there a way to store values selected from a database? for further processing?
that is, I need to pass the variable level (report parameters) presentation to complex calculations to a PL/SQL function.
Also my requirement might be solved if I can get access to the selected values of logical column in the tab 'Business Model and mapping' definition in the BI administrator.
that is, I'll be able to define the logical column using VALUEOF (NQ_SESSION. < nom_var >)

Kind regards
Mr.Maverick

Hello.

1 do SQL PL/function (in the database) which has an input parameters, which number depends on number of guests and in it you'll insert these parameters into a table.

2. your report in column expression answers call this function that will do insert, the code would be like:
EVALUATE ("YOUR_FUNCTION (1%, 2%, 3%, 4%) (' as varchar (20), @{p_1}, @{p_2}, @{p_3}, @{p_4})

3. Note that the function returns something and be careful on data types inside EVALUATE it.

4. notes that, in the case where some messages are not selected (all or nothing) you recognize this case as:

-case when LENGTH('@{pv_var}') > 0 then ' @{pv_var}' end else' all '.

or like this:

-case when LENGTH('@{pv_var}') is null then 'all choice"other" @{pv_var}' end; "

Kind regards
Goran
http://108obiee.blogspot.com

Tags: Business Intelligence

Similar Questions

  • How to keep the value of Session in OBIEE

    I have an obligation to transmit the session of a page variable to the next page in the dashboard.

    Requirement :

    In the part of the presentation:

    Prompt: Column1: year
    Column2: quarter

    I have to pass the selected value in the fast control panel to the repository. To achieve this, I've stored the value of year and quarter column in 2 request variables from the prompt.

    Request Variable1: VarYear stores the value selected year
    Request Variable2: VarQuarter stores quarter selected value

    In the part of the repository:

    1. I created session variables 02 repository with the same name as: VarYear and VarQuarter
    2. under the Block Intitialization of two Variables, I wrote a dummy query as
    ' SELECT PER_NAME_ENT_YEAR FROM W_DAY_D WHERE PER_NAME_ENT_QTR IS NOT
    NULL'
    3. checked the box for "Allow any user set the value" for two session variables.
    4 using the session variable to transmit as a filter on the tab content measurement of the LTS of income as follows:

    «"Oracle Data Warehouse".» Catalog.dbo.Dim_W_DAY_D.PER_NAME_ENT_YEAR = VALUEOF (NQ_SESSION. ("' VarYear") AND "Oracle Data Warehouse. Catalog.dbo.Dim_W_DAY_D.PER_NAME_ENT_QTR = VALUEOF (NQ_SESSION. ("' VarQuarter ')'


    Resolution: The session from the prompt variables is pass correctly to the RPD and returning the result as expected for the current page (invites the two and the report are in the same page where I used the measure of income which is getting filtered in the LTS on the basis of the quarter and the year to the title of the content tab).


    Reuirement2 question:

    I have to navigate from one page to another when the click on the value of the income measure. The target page also contains the same measure of income as in first page. But on the navigation from one page to another page, the session value is getting lost and passing the default value from the block of initialization of the Session instead of the selected value in the command prompt.


    According to my understanding of that session value shouldn't be replaced up to a disconnection from the user of the application. But in my case for the first page where I times Promt and measure revenues the prompt value is pass correctly but when I move to the second page where I only the income measure session value which is already defined at the beginning is replaced with the result of query Session IB.


    Please suggest me if there is no resolution to my problem.

    Thank you very much in advance.
    :)

    I had this problem myself, and here is what I found. The only way I could make it work was to have guests who populate the Session Variables on the pages. In other words if I got the prompt on one page and then used guided navigation to go to another page of dashboard I needed to have the same guests located on this page for session values get passed in. Since in my case I didn't want the guests to view it or the user to know that I had to add the dashboard invites you to capture of Session Variable values, I placed the guests of dashboard for my Session Variables in a separate section and then hid this user story. I hid the section by selecting Properties - Style (HTML only) custom CSS Options and then clicked the box to tick to use Custom CSS Style. In the text box type display: none which will cause the section to hide from the user. Guests will then exist on the dashboard page to receive the session values and the user will never know it's there.

    Hope this helps.

    Eric
    http://www.BIConsultingGroup.com

  • How to store the value in labview

    I write a VI and need set a reference point before I have my operation.

    Is there a way to hold the values for all 8 channels I am able in a constant number at the push of a button?

    If I had this, I might just have the VI subtract these core values on and get my reference.

    Thank you!

    Generally, you would hold the reference value in a knot of registry or feedback shift.

    Here's a simple example (LV 8.0)

  • How to store the values separated by commas

    Hi all

    I have a table named discount, with discount_id (number data type) as one of the columns.
    The user gives an entry as the value separated by commas, (ex: '123,27890,3543')
    I use built-in proc that separates the values separated by commas.
    DECLARE
       l_input   VARCHAR2 (4000) := '123,27890,3543';
       l_count   BINARY_INTEGER;
       l_array   DBMS_UTILITY.lname_array;
    BEGIN
       DBMS_UTILITY.comma_to_table (
          list     => REGEXP_REPLACE (l_input, '(^|,)', '\1x'),
          tablen   => l_count,
          tab      => l_array);
       DBMS_OUTPUT.put_line (l_count);   
    
       FOR i IN 1 .. l_count
       LOOP
          DBMS_OUTPUT.put_line (
                'Element '
             || TO_CHAR (i)
             || ' of array contains: '
             || SUBSTR (l_array (i), 2));
       END LOOP;
    END;
    
    Result:
    3
    Element 1 of array contains: 123
    Element 2 of array contains: 27890
    Element 3 of array contains: 3543
    Result set is stored in a table.
    I would like to do a select on the table of discounts
    Select * discount where discount_id (123, 27890 3543).

    I am looking for options,
    I need to create a new physical table as
    Create table new_table (identification number) and bulk insert in this table.
    Select * discount where discount_id in (select distinct id of new_table).
    or
    Is there a better way?

    THX
    Rod.

    Hello, SamFisher.
    May be the recursive subquery factoring help you?

    WITH test(f1, n) AS (select '12, 15, 235', 1 from dual
                         UNION all
                         select f1, n + 1 from test where n < regexp_count('12, 15, 235', ',') + 1)
    SELECT regexp_substr(f1, '[^, ]+', 1, n) f
    FROM test
    
  • How to get the value of messageStyledText that is present in the other RN

    Hello

    I have xxcompscore messageStyledText in the region 1 (separate controller) and xxobjscore messageStyledText in the region.2 (separate controller).

    The two values are doubles.

    My requirement is to get that value from another region (layout) and adds that the values and display in the RN.

    How to do this, I tried a lot but I get error NullPointerException.

    HI San,

    According to my understanding, you have the following requirement.

    xxcompscore messageStyledText in the region1 (separate controller) - Say controller is XxxRN1CO
    xxobjscore messageStyledText in region.2 (separate controller). -The controller is XxxRN2CO
    Page Layout RN - Say controller is XxxPageLayoutRNCO

    If you try to get the value of the region1 - PR Noire2 and display in Pagelayout cannot be achieved by the way you write the code...
    What follows is drawn sequence of the controller...
    1 XxxPageLayoutRNCO--> processRequest
    XxxRN1CO--> processRequest
    XxxRN2CO--> processRequest

    XxxRN2CO--> processFormRequest
    XxxRN1CO--> processFormRequest
    XxxPageLayoutRNCO--> processFormRequest

    So you can't get the session values configured in XxxRN1CO--> processRequest or XxxRN2CO--> processRequest in XxxPageLayoutRNCO--> processRequest.

    You need to take the following approach to get these values.

    -> If the underlying VO for the region1/region.2 is executed in PageLayout controller or controller of the region1
    then you can get the required values of the underlying attributes of your calculation VO do and set the value of TotalScoreText
    on the other
    If executed in the level controller VO region then you will need to run these vo also in pageLayout controller and
    get the values of the attributes of VO and do your math and set the value to TotalScoreText

    Let me know if you need assistance.

    Kind regards
    RAM

  • How to store the value in the database using UTF-8 Content-Type

    Hi all

    I created a web application that uses soap services.

    I want to store data in my data base oracle in Hindi language, so I configured my compiler Jdeveloper in UTF - 8 as well as my oracle database also supports utf - 8.

    but when I store hindies data through web service (Soap service), value was stored as? in my database.

    where as when I store data hindies without web service data is stored as unicode (& #23455 ;) who can be recover in hindi font I have my jsp pages.

    Here is my sample code:

    package com.example.service;

    import com.example.bean.LanguageBean;

    import com.example.conn.OracleDBConnection;

    import java.sql.Connection;

    import java.sql.PreparedStatement;

    import java.sql.ResultSet;

    import java.util.ArrayList;

    import java.util.List;

    Import javax.jws.WebService;

    Import javax.xml.ws.BindingType;

    Import javax.xml.ws.soap.MTOM;

    Import javax.xml.ws.soap.SOAPBinding;

    @WebService (serviceName = "ExampleService", endpointInterface = "com.example.service.ExampleServicePortType")

    @BindingType (SOAPBinding.SOAP12HTTP_BINDING)

    public class ExampleService {}

    Connection con = null;

    PreparedStatement pst;

    ResultSet RST;

    public ExampleService() {}

    Super();

    }

    @WebMethod

    public String insertValue (String eng, hindi string) {}

    String result = null;

    try {}

    con = OracleDBConnection.getConnection ();

    PST = con.prepareStatement ("insert into test1 values(?,?)" "") (English, hindi);

    pst.setString (eng, 1);

    pst.setString (2, hindi);

    int i = pst.executeUpdate ();

    result = i + "Notice inserted successfully;

    } catch (Exception ex) {}

    ex.printStackTrace ();

    } {Finally

    try {}

    OracleDBConnection odbc = new OracleDBConnection();

    odbc.closeConnection ();

    } catch (Exception ex) {}

    ex.printStackTrace ();

    }

    }

    return the result;

    }

    @WebMethod

    public list < LanguageBean > getAllRecords() {}

    < LanguageBean > the list result = new ArrayList < LanguageBean > ();

    LanguageBean lbs = null;

    try {}

    con = OracleDBConnection.getConnection ();

    PST = con.prepareStatement ("select English, hindi test1");

    RST = pst.executeQuery ();

    While (rst.next ()) {}

    lb = new LanguageBean();

    lb.setEnglish (rst.getString ("english"));

    lb.setHindi (rst.getString ("hindi"));

    result. Add (lb);

    }

    } catch (Exception ex) {}

    ex.printStackTrace ();

    } {Finally

    try {}

    OracleDBConnection odbc = new OracleDBConnection();

    odbc.closeConnection ();

    } catch (Exception ex) {}

    ex.printStackTrace ();

    }

    }

    return the result;

    }

    }

    Same thing happened when I send data from Oracle Application of MAF.

    Thanks and greetings

    Patrick Srivastava

    Thank you all, I found the solution to my problem. I put the CharacterSeto of my Oracle in UTF - 8 database.

  • How to store the query string value in the scope of the session in webcenter spaces?

    Hello

    I want to store the query string value (which is given from URL) in the sessionScope variable. According to the value of sessionScope beacause I went some components inside my taskflow. Can someone help me how to store this value in the scope of the session. I use webcenter spaces for my application development.

    Thank you

    Ashok.

    Please see the article below

    How to pass a parameter of argument the query URL to a parameter input workflow? (Doc ID 1545808.1).

  • Double click and get and store the value in the variable.

    Hello

    It is my intention when I double click on a particular record on a table, I want to enter or store the specific record value in a variable and call this variable in the print/preview PLSQL code button.

    Below, I show the screenshot that contains a preview in the form of table and print button. After filling in the data. user double click the code officer LC354 and click Print Preview/mode button, it should display the report for only the
    Code of the agent of LC354(it's what I want). But normally when I click Preview before printing it affects wil see the report of the code of the agent of LC354 and LC325(which I don't).

    http://ImageShack.us/photo/my-images/811/printpb.PNG/

    My problem is how to capture the value ((*LC354*)) particular registration after double click the code(*LC354*) agent?

    I tried to store the agent code in the variable AG_CNT in mouse double click trigger with after the plsql code. but it dosent work.
    declare
    AG_CNT varchar2(10);
    begin
    *AG_CNT* :=GET_ITEM_PROPERTY('RFQ_AGENT_DETAILS.AGENT_CODE',CURRENT_RECORD);
    end;
    After that pass this AG_CNT value in *: AG_CODE *. the code below is in the Print/Preview button.
         cursor c1 is select nvl(count(ENQUIRY_NO),0) from scott.EXP_QUOTE_STATUS 
         where ltrim(rtrim(upper(job_status))) like 'APPROVED%' and ENQUIRY_NO = :REQ_FOR_QUOT.ENQUIRY_NO
    AND AGENT_CODE=*:AG_CODE* ;
    How to do this?

    SKUD.

    Hello

    When you click a folder, the focus moves to that record. To get the values of each element, just use the standard:

    :value := block.item ;
    

    François

  • How to acquire and store the values of DAQmx analog voltage (I do not want the graphic, but strings and values in a chart)?

    Hello

    How acquire and store the values of voltage DAQmx?

    I tried several code example, but they can't get the chart. I don't want to chart. I want to measure exactly the analog voltage values and record these values - as an excel chart, that contains the selected channels and voltage values.

    What the example code that I can use?

    My hardware is NI PCI-6251.

    Thank you very much.


  • How to display the value of the variable for bottom of pl/sql

    How to display the value of the variable for bottom of pl/sql

    declare

    V_1 number: = 10;

    V_2 number: = 20;

    V_3 number: = 30;

    v_4 number: = 40;

    v_5 number: = 50;

    test varchar2 (100);

    Start

    I'm in 1.5

    loop

    test: = "v_" | I have;

    dbms_output.put_line(i||) e > ' | test);

    end loop;

    end;

    /

    How to get below output:

    1 > v_1

    2 > v_2

    3 > v_3

    4 > v_4

    5 > v_5

    But I want to output of

    1 > 10

    2 > 20

    3 > 30

    4 > 40

    5 > 50

    Hello

    You cannot reference variables as you did and get the value of the variable. Use pretty collection.

    set serveroutput on size 2000
    declare
      type      number_table is table of number;
      numbers   number_table := number_table(10, 20, 30, 40, 50);
    begin
      for i in numbers.first .. numbers.last
      loop
        dbms_output.put_line(i || '->' || numbers(i));
      end loop;
    end;
    /
    
    anonymous block completed
    1->10
    2->20
    3->30
    4->40
    5->50
    

    See the Collections of PL/SQL and Records http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#LNPLS005

  • using the function - how to use the values of the input variables on the table select statement names

    Hello community, I have a problem when creating a function. The purpose of this function is to check the table of weather gave yesterday or not. We must check this on different tables on different sachems. We are creating a function with input variables.

    CREATE OR REPLACE FUNCTION IN_SCHEMA.IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    )

    RETURNS INTEGER

    AS

    -Declaring variables

    v_is_true INTEGER.

    BEGIN

    SELECT

    CASE

    WHEN MAX (in_datefield) = TRUNC(SYSDATE-1)

    THEN 1

    ON THE OTHER

    0

    END

    IN

    v_is_true

    Of

    in_schema.in_tablename

    ;

    RETURN v_is_true;

    END;

    /

    When creating, I got error: [error] ORA-00942 (44:19): PL/SQL: ORA-00942: table or view does not exist

    How to use the values of the input variables on the table select statement names?

    Hello

    Here's a way you can use dynamic SQL statements for this task:

    CREATE OR REPLACE FUNCTION IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    in_first_date DATE DEFAULT SYSDATE - 1,.

    in_last_date DATE by DEFAULT NULL

    )

    RETURNS INTEGER

    AS

    -IS_YDAYDATA_TO_TABLE returns 1 if in_schema.in_tablename.in_datefield

    -contains all the dates in the in_first_date of the range through included in_last_date

    - and it returns 0 if there is no such lines.

    -If in_last_date is omitted, the search only the data on in_first_date.

    -If in_first_date is omitted, it defaults to yesterday.

    -Time parts of the in_first_date and in_last_date are ignored.

    -Declaring variables

    sql_txt VARCHAR2 (1000);

    v_is_true INTEGER.

    BEGIN

    sql_txt: = 'SELECT COUNT (*).

    || 'FROM ' | in_schema | '.' || in_tablename

    || 'WHERE ' | in_datefield | ' > =: d1'

    || «AND» | in_datefield | '< >

    || 'AND ROWNUM = 1';

    dbms_output.put_line (sql_txt |) '= sql_txt in IS_YDAYDATA_TO_TABLE");  -For debugging

    Sql_txt EXECUTE IMMEDIATE

    IN v_is_true

    With the HELP of TRUNC (in_first_date) - d1

    TRUNC (NVL (in_last_date

    in_first_date

    )

    ) + 1                -- d2

    ;

    RETURN v_is_true;

    END is_ydaydata_to_table;

    /

    DISPLAY ERRORS

    If you must use dynamic SQL statements, put all the SQL statement in a single string variable, such as sql_txt in the example above.  In this way, you can easily see exactly what will be executed.  Comment out the call to dbms_output under test is completed.

    Try to write functions that will address not only the question that you have now, but similar questions that you may have in the future.  For example, now that interest you only to the verification of the data of yesterday, but later, you might want to check another day or range of days.  The above function combines the convenience of a function simple (looks like yesterday data if you don't tell him otherwise) with the power of a more complex function (you can use the same function to check any day or range of days).

  • How to reference the value of a &lt; af:inputText &gt; to the level of the view in a java class

    How to reference the value of a < af:inputText > to the level of the view in a java class to level model? Thank you!

    Hello!
    1: you must close this topic and open another... :))) and game question calls for a response (if my answer is correct: set my answer - correct answer)...

    2nd: for example in your java class in view level:

    links BindingContainer private;

    public BindingContainer {} getBindings()
    If (this.bindings == null) {}
    FacesContext fc = FacesContext.getCurrentInstance ();
    This.Bindings =
    (BindingContainer) fc.getApplication () .evaluateExpressionGet (CF,
    "#{bindings}."
    BindingContainer.class);
    }
    Return this.bindings;
    }

    Public Sub UseSetMyParam()
    {
    Fcab FacesCtrlActionBinding = (FacesCtrlActionBinding) getBindings () .getControlBinding ("setMyParam");
    fcab.doIt ();
    }

  • How to pass the value of the variable record type in the procedure

    Hai All

    My Question is

    I have a table named Emp and the structure

    ID Varchar2 (25)

    Name varchar2 (25)

    Number of salary


    And now, I created a folder named Rec_Emp

    Like this

    Type Rec_emp is made
    (Rec_Id varchar2 (25),)
    rec_name varchar2 (25).
    Number of Rec_salary);
    rec_emp emp_record;


    I created a SQL type

    Now how to pass the value type in the procedure


    Thanks and greetings
    SrikkanthM

    You are looking for something like this

    create table my_emp (id integer, name varchar2(100), sal number)
    /
    create type my_emp_obj as object(id integer, name varchar2(100), sal number)
    /
    create or replace procedure insert_into_my_emp(pEmp_Obj in my_emp_obj)
    as
    begin
      insert into my_emp (id, name, sal) values(pEmp_obj.id, pEmp_Obj.name, pEmp_obj.sal);
    end;
    /
    begin
      insert_into_my_emp(my_emp_obj(1,'karthick',1000));
    end;
    /
    select * from my_emp
    /
    
  • ([JDev12c, ADF] 1) how to get the value of a field of the line currently selected in question 2) af:table: flowScope

    Hallo,

    How can I get the value of a field in the row that is currently selected in an af:table?

    I need to pass this value to a setCurrentRowWithKeyValue who took the record to display in another (by a button) called page:

    Limited workflow

    Page1 - goToPage2-> setCurrentRowWithKeyValue-> PAGE2

    I defined a managed bean flowScope for the workflow in which I created the variable 'CodeToSetPage2Row '.

    I will store the value of the field for the selected line in this variable so that I can move on to the setCurrentRowWithKeyValue.

    Could be this method OK? Ore is there any good practice to achieve this goal?

    The managed bean flowScope used to go to the stubborn task may take some values from the outside?

    The workflow defined will be executed in a dynamic region.

    Thank you

    Federico

    Federico, you cannot use a flow variable scope for this page. The region has no access to the bean. You must use a workflow for this parameter.

    To get an attribute of the currently selected line you make slide data vo of control on the page attribute. This will create a link attribute for this attribute. Once this link exists, switch to source mode and remove the component that you do not want.

    The framework passes the value of the current row in this affair of the attribute (table should be in single selection mode).

    Click on the button, you switch the binding of the attribute for the setting of task flow using a setPropertyListener.

    In the workflow, you call the setCurrentRowWithKeyValue with the parameter of workflow as the default activity.

    Timo

  • How to get the value of a * Global * Application point of JS

    If we declare an element of the request, which is NOT a level of the page in question, how we get the value of this element in an Action dynamic JavaScript on a page?

    For example, we declare a "global" variable as an Application named DEFAULT_AJAX_SEPERATOR and set its value with a calculation of the claim "on the new Instance" a moment later, on a page of the application, we would like to get the value of DEFAULT_AJAX_SEPERATOR via JavaScript.

    Page* level syntax element...
    $v( 'DEFAULT_AJAX_SEPERATOR' );
    .. How does not work. I don't understand why it's like $v can only access the elements on the page. However, the APEX is clearly able to get these global values since, for example, they are available in PL/SQL blocks. Also, I know that it is on the session object, because I can see it when viewing the session.

    So... What is sauce secret for obtaining this value?

    Thank you

    -Joe

    Hello
    Use something like this in your javascript code.

    var appItemVal = "& DEFAULT_AJAX_SEPERATOR.";

    Thank you
    Naidu789.

    If you think, I responded to your question, please mark as answer.

Maybe you are looking for