Storing the value of apex_item.radiogroup!

Hi All,
I am using an APEX_ITEM.RADIOGROUP api to display the rating from 1 to 5.
In order to store the value of radio button selected, I am using a textbox item.
e.g.
P2_ques_1 = rating value from 1-5( coming from radio group)
P2_ques_2 = rating value from 1-5
Now I want to save the value of P2_ques_1... into the database through a loop.
for i in 1..4 loop
l_rating := :P2_QUES_||i;
INSERT INTO org_feedback(feedback_id,question_id,rating,org_contact_id)
VALUES(ORGFEEDBACKSQ.NEXTVAL,i,l_rating,:P2_CONTACT_ID);
end loop;
The above loop is storing the value of "i" instead of values of : P2_QUES_1,: P2_QUES_2....
Is there any way or suggestion I can achieve this?
Thanks,
- Parveen Sehrawat

I can't catch you.
Let me explain what i want to do...
I have radio button in forms as well as in reports.
In FORMS i created a RADIO GROUP using STATIC LOV
Like,
STATIC:GOOD;3,NOTBAD;2,BAD;1
So at runtime i can easily get this radio group values.
In REPORTS i created RADIO GROUP using SELECT QUERY
Like,
with t as(
select 'problem_sol' as others, 1 as num from cand_performance
union
select 'communication' as others, 2 as num from cand_performance
union
select 'attitude' as others, 3 as num from cand_performance)
select others,
apex_item.radiogroup(num) as good,
apex_item.radiogroup(num) as notbad,
apex_item.radiogroup(num) as bad
from t
Now i want to define values for those radio button like what i define in STATIC LOV radio buttons and i want to know how to get the selected value when user submit the page... Again i'm telling i have radio button in REPORTS.
Edited by: Nagappan_19 on May 20, 2013 4:48 AM

Similar Messages

  • Storing the values of multi-select on a presentation variable

    I've been asked to present the values selected by a user on a multi-select dashboard prompt as the title for the report. But when you select this option at the time you are creating the prompt, the option to store the values in a presentation variable dissapears, seems that you can only store the value if it comes from a dropdown list ? If anybody knows of a way to accomplish this I would appreciate very much if you can share it.
    Thanks,
    Cuauhtemoc M.

    Hi,
    does the description here help?
    http://www.rittmanmead.com/2009/11/06/oracle-bi-ee-10-1-3-4-1-multi-select-prompts-string-aggregation/
    Regards
    Andy

  • Storing the values from a procedure - help required

    Hi All,
    I am having a package which consists of two procedures.
    Both the procedures need to calculate 6 averages of some of my fields based on unique number.
    (These two procedures process different unique numbers).
    Now, as same code is implemented in the two procedures for calculation,
    I want to move the logic into another procedure/function, with IN parameter as the unique number.
    Now how can I get these 6 values from the procedure.
    If I use OUT parameters, how can I get the values inside the procedure.
    Please suggest me a solution.
    Thanks in advance.
    Regards
    Raghunadh

    Example of pipelined function...
    SQL> CREATE OR REPLACE TYPE myrec AS OBJECT
      2  ( col1   VARCHAR2(10),
      3    col2   VARCHAR2(10)
      4  )
      5  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE myrectable AS TABLE OF myrec
      2  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE FUNCTION pipedata(p_str IN VARCHAR2) RETURN myrectable PIPELINED IS
      2    v_str VARCHAR2(4000) := REPLACE(REPLACE(p_str, '('),')');
      3    v_obj myrec := myrec(NULL,NULL);
      4  BEGIN
      5    LOOP
      6      EXIT WHEN v_str IS NULL;
      7      v_obj.col1 := SUBSTR(v_str,1,INSTR(v_str,',')-1);
      8      v_str := SUBSTR(v_str,INSTR(v_str,',')+1);
      9      IF INSTR(v_str,',')>0 THEN
    10        v_obj.col2 := SUBSTR(v_str,1,INSTR(v_str,',')-1);
    11        v_str := SUBSTR(v_str,INSTR(v_str,',')+1);
    12      ELSE
    13        v_obj.col2 := v_str;
    14        v_str := NULL;
    15      END IF;
    16      PIPE ROW (v_obj);
    17    END LOOP;
    18    RETURN;
    19  END;
    20  /
    Function created.
    SQL>
    SQL> create table mytab (col1 varchar2(10), col2 varchar2(10));
    Table created.
    SQL>
    SQL> insert into mytab (col1, col2) select col1, col2 from table(pipedata('(1,2),(2,3),(4,5)'));
    3 rows created.
    SQL>
    SQL> select * from mytab;
    COL1       COL2
    1          2
    2          3
    4          5Although I'm not sure you necessarily need to do it this way. Could you show us the code you are using and more details of what you are trying to do?

  • UDF for reading a particular line and storing the value in a variable

    Hi Experts,
    I am reading entire file content in single feild in source data type.I want to write a UDF to seach for a particular pattern(say :25: and store the value after it i.e  34535764778 detination for further use).
    EX: My  sample file and its  has feilds like
    point assured
    Thanks

    Hi since u are using a single field only then u dont need to use any advanced function
    Wel because if u see the formation of the queue u wil find the the whole data is under one context.. and there are not more context changes
    Convert the string to an array and progressively u can check for the four checks if the a<i>=:
    then a[i+]=2 then a[i]=5 and a[i+] =: and then substring the next 7-8 chrac.. hope u understand
    If this also doesnt work wel then u will have to use the Pattern class in Java
    By the way remember that the substring value cant be retained for the next instance of mapping
    Hope u have that in mind...
    Rgds
    Aditya

  • Capturing insert done and storing the value Inserted

    Hi All
    I am trying to insert In multiple table where one tbl PK is FK of other , I achieved that functionality using Instead of Insert trigger.(PK is handled by another trigger) -- main function
    Now On successfully insert i need to captured the PK in Hidden variable to pass it on further for more insert on other table (Pk again being Fk to this table)--- secondary function
    Any inputs on this is highly appreciated.
    Thanks
    NS

    Hi
    If you are not using DML process and using your own custom insert statement. You can probably include the following statement along with your insert statement to fetch the PK value in page item.
    INSERT INTO ....;
    SELECT seq_name.nextval INTO :PX_ITEM_NAME FROM DUAL;I guess you are using sequence to generate the PK value. Please update the script as per your table and sequence name.
    Good luck.
    Regards,
    Tajuddin

  • Store APEX_ITEM.RADIOGROUP value into the database!

    Hi All,
    I am using the following query to display questions from a table. Does anyone know how we can insert the value of APEX_ITEM.RADIOGROUP(if it is a radiogroup with static LOV ie. Static2: very poor;1,good;2,very good;3,excellent;4) into the database.
    select question_id,
    question_desc,
    APEX_ITEM.RADIOGROUP(1) as rating
    from table_name
    Thanks,
    Parveen Sehrawat

    Also tried it this way:
    function reviewerID() {
    var reviewer =html_RadioValue('f01');
    if (reviewer == 1){
    html_GetElement('P1_CUSTOMER_ID').value = 1;
    if (reviewer == 2){
    html_GetElement('P1_CUSTOMER_ID').value = 2;
    if (reviewer == 3){
    html_GetElement('P1_CUSTOMER_ID').value = 3;
    if (reviewer == 4){
    html_GetElement('P1_CUSTOMER_ID').value = 4;
    if (reviewer == 5){
    html_GetElement('P1_CUSTOMER_ID').value = 5;
    its clumbsy but i thought it would do the job... am still gettin the same error trying it this way though....
    l_This has no properties
    l_Selects = l_This.getElementsByTagName('SELECT');
    Help from anyone much appreciated!!

  • Report With Multiple Radio Button ,How to reset the values of when selected

    Reaching out to the experts here. I have a report which i created a radio group which saves the value rownum when the radio buton is selected to a hidden item based on an on click event. There are currently 3 radio button , i need to be able to "reset" the value of the other items when more than of the button are selected .I.E. There are 3 buttons, user clicks button one , but then decides they need to click button two , then realizes they really wanted to perform button 3 , I want to be able to "reset" the value of the 1st two hidden items so the only value populated is the 3rd hidden item. I am new to working with these features and scenarios so any and help would be appreciated.
    Here is the report
    SELECT APEX_ITEM.RADIOGROUP(1, ROWNUM, NULL,NULL,'onclick="javascript:$x(''P5_HIDDEN1'').value=' || ROWNUM|| '"') UPDATE_RECORD
    ,APEX_ITEM.RADIOGROUP(1, ROWNUM, NULL,NULL,'onclick="javascript:$x(''P5_HIDDEN2'').value=' || ROWNUM|| '"') DELETE_RECORD
    ,APEX_ITEM.RADIOGROUP(1, ROWNUM, NULL,NULL,'onclick="javascript:$x(''P5_HIDDEN3'').value=' || ROWNUM|| '"') SET_PRIMARY
    ,papf.first_name
    ,papf.last_name
    ,hl.meaning
    ,pp.phone_number
    ,case when phone_type is not null then (select meaning from hr_lookups where lookup_type ='PHONE_TYPE' and pp.phone_type=lookup_code)
    end as phone_type
    ,emrg.primary_contact_flag
    from hr.per_all_people_f papf
    ,apps.hr_lookups hl
    ,apps.per_contact_relationships pcr
    ,apps.per_phones pp
    ,(select contact_person_id,primary_contact_flag
    from apps.per_contact_relationships pcr
    where pcr.person_id = :P5_PERSON_ID
    and contact_type = 'EMRG') emrg
    where pcr.contact_person_id in emrg.contact_person_id
    and pcr.personal_flag='Y'
    and contact_type <> 'EMRG'
    and trunc(sysdate) between date_start and NVL(date_end,'31-DEC-4712')
    and pcr.contact_type = hl.lookup_code
    and hl.lookup_type='CONTACT'
    and pcr.contact_person_id = papf.person_id
    and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
    and pcr.contact_person_id = pp.parent_id
    and pp.phone_type in (select lookup_code from hr_lookups where lookup_type ='PHONE_TYPE')

    Related thread here How to Pass values from SQL Report into TEXT ITEM ?
    Regards,

  • How to populate a context node on the basis of the values in another node?

    Hi,
    I have a Webdynpro application which has to run on Portal as well as BlackBerry.
    In this application I have a scenario where I need to have a sub node inside a node but as Blackberry doesn't support sub nodes with Singleton value false, I have to use another node for storing the values which earlier wre present in the sub node.
    The actual scenario here is that we have two tables A & B. For each row of table A we have a no of rows in table B. This can be easily accomplished for Web Browser but we need to do this for Blackberry.
    My question here is that how can i populate the data in table B at runtime using the concept of onLeadSelect. I am not able to fully undersans this concept.
    According to my approach I have two a while loop which generates data for  table A and inside this while loop I have another while which generates data for table B corresponding to each iteration of the outer while loop. I create the node elements for the rows of the table B and store them in a list and then store this list in a HashMap corresponding to a key formed by combining the values of all the elements of the row of table A.
    Now I am not able to understand how can I display this data into table on user slecting a particular row.
    Please guide ASAP.
    It wille quite useful if you can provide me with some code snippets for the same.
    Thanks in advance!
    Manish

    Hi Manish,
             In WebDynpro u can use the onLeadSelect event of table A and do all the processing in that method.Like u can use this method to fill ur context node,which will be the source node for table B. So this way u need not to use any hash map.Fill the source node of table B with data corresponding to ur selected data of table A.
      I hope this solution wud help u in solving ur problem.
    Reena

  • How do you retrieve the value?

    Hi There,
    XML request is:
    <?xml version="1.0" encoding="utf-8"?>
    <payload>
      <region>
        <__type>Category:#Test.XYZ.Framework.Categorization</__type>
        <Extension></Extension>
        <Id></Id>
        <Name>
          <en></en>   
        </Name>   
      </region>
    </payload>
    I did an XML to JSON conversion on the above and stored the value of "en" node under "Name" in an attribute named "payload.region.Name.en" by extracting using JSON path filter - using "$.payload.region.Name.en".
    But, when I print the value of the attribute, it is printing as "null". Any idea why? I was expecting "" as I do not want the string null to be send as the value for "en".
    Regards,
    ET

    Hi,
    The XML to JSON filter does actually converty empty value into the string "null" in the JSON and when you read it out with the path it actually reads the string "null". It does look a bit flawed in my opinion and I recommend creating a support case for it..
    But a solution for you!
    Create a script filter (JavaScript) after you have read the parameter and do this:
    function invoke(msg)
        var att = msg.get("payload.region.Name.en");
       if (att == "null") {
          msg.put("payload.region.Name.en", "");
        return true;
    It will just replace null with an empty string!
    Cheers,
    Stefan

  • Apex_item.radiogroup in updateable Report

    How can i build up an updateable Report with a radiogroup created by apex_item.radiogroup?
    i know the syntax like
    APEX_ITEM.RADIOGROUP (1,deptno,'20',dname)
    but i wanna have 5 different options in 1 radiogroup.
    How can i manage this?
    thx so far
    P.S.: I know that you can define a column to be a radiogroup but in my case it must defined with the apex_item package.

    Hi,
    Have a look at: Re: User Radiogroup in Tabular Form - there are several methods that you could use - the details for each are shown in the app pages themselves rather than the thread
    Andy

  • Unable to use the values returned by a PL/SQL stored procedure in a XSQL page

    Hi,
    I've been messing around with XML and XSQL in particular. I was trying to write a xsql page to display a report with account totals...I have the following .xsql which calls a PL/SQL stored procedure :
    <?xml version="1.0"?>
    <xsql:query connection="pfcdm" xmlns:xsql="urn:oracle-xsql">
    <xsql:set-session-param name="zasset_total" value="100">
    <xsql:dml connection="pfcdm">
    rraman.sp_vw_id(zasset_total,zinvm_total,zmkt_val);
    </xsql:dml>
    </xsql:set-session-param>
    select 'Asset total is {@zasset_total}' as "ASSET_TOTAL" from dual
    </xsql:query>
    My procedure sp_vw_id returns the values that it should. But, I am not sure how to declare variables within a page, and to output the return values. There is very scanty documentation on the usage of <xsql:dml> or <xsql:ref-cursor-function>.
    Any response would be greatly appreciated.
    Thanks,
    Raja

    Here is the example from the Oracle9i (complete rewrite) of the XSQL Chapter in our Oracle documentation.
    Question
    I using <xsql:dml> to call a stored procedure which has one OUT parameter, but I was not able to see any results. The executed code results in the following statement:
    <xsql-status action="xsql:dml" rows="0"/>
    Answer
    You cannot set parameter values by binding them in the position of OUT variables in this release using <xsql:dml>. Only IN parameters are supported for binding. You can create a wrapper procedure that constructs XML elements using the HTP package and then your XSQL page can invoke the wrapper procedure using <xsql:include-owa> instead.
    For an example, suppose you had the following procedure:
    CREATE OR REPLACE PROCEDURE addmult(arg1 NUMBER,
    arg2 NUMBER,
    sumval OUT NUMBER,
    prodval OUT NUMBER) IS
    BEGIN
    sumval := arg1 + arg2;
    prodval := arg1 * arg2;
    END;You could write the following procedure to "wrap" it, taking all of the IN arguments that the procedure above expects, and then "encoding" the OUT values as a little XML datagram that you print to the OWA page buffer:
    CREATE OR REPLACE PROCEDURE addmultwrapper(arg1 NUMBER, arg2 NUMBER) IS
    sumval NUMBER;
    prodval NUMBER;
    xml VARCHAR2(2000);
    BEGIN
    -- Call the procedure with OUT values
    addmult(arg1,arg2,sumval,prodval);
    -- Then produce XML that encodes the OUT values
    xml := '<addmult>'&#0124; &#0124;
    '<sum>'&#0124; &#0124;sumval&#0124; &#0124;'</sum>'&#0124; &#0124;
    '<product>'&#0124; &#0124;prodval&#0124; &#0124;'</product>'&#0124; &#0124;
    '</addmult>';
    -- Print the XML result to the OWA page buffer for return
    HTP.P(xml);
    END;This way, you can build an XSQL page like this that calls the wrapper procedure:
    <page connection="demo" xmlns:xsql="urn:oracle-xsql">
    <xsql:include-owa bind-params="arg1 arg2">
    BEGIN addmultwrapper(?,?); END;
    </xsql:include-owa>
    </page>This allows a request like:
    http://yourserver.com/addmult.xsql?arg1=30&arg2=45
    to return an XML datagram that reflects the OUT values like this:
    <page> <addmult><sum>75</sum><product>1350</product></addmult>
    </page>

  • Getting value from Function stored in a schema and Watching the value of objects

    hi
    i'd like to display a labelA which is from a query -> (SELECT NAME FROM TABLE1 WHERE NAME = GetA). GetA is a function which I created in SchemaA. GetA returns a varchar2. In this case.. how can i do that ?
    should i write the PL/SQL in the format trigger of this labelA ? if yes, then what should i write in the PL/SQL format trigger ? or should i create another query in Data Model ?
    And how do get hold of this labelA's value(or the result returned by the query) in the parameter form?
    And lastly is there a way to trace the value of some report objects ?
    should i use SRW.MESSAGE ? to print out the 'watched' value ? or any other alternatives ?
    what is the url that takes me to learn all these ?
    I got this error "REP-1401: 'beforepform': Fatal PL/SQL error occurred." when i initialize the bind variable to a function (GetA)stored in Schema A ---> :P_A := GetA in the before_parameter_form of report trigger;
    anything wrong with the above assignment ?
    are there any difference between stored procedure like function, package in the database and those in in PL/SQL Library of report builder ???
    null

    hi
    i'd like to display a labelA which is from a query -> (SELECT NAME FROM TABLE1 WHERE NAME = GetA). GetA is a function which I created in SchemaA. GetA returns a varchar2. In this case.. how can i do that ?
    should i write the PL/SQL in the format trigger of this labelA ? if yes, then what should i write in the PL/SQL format trigger ? or should i create another query in Data Model ?
    And how do get hold of this labelA's value(or the result returned by the query) in the parameter form?
    And lastly is there a way to trace the value of some report objects ?
    should i use SRW.MESSAGE ? to print out the 'watched' value ? or any other alternatives ?
    what is the url that takes me to learn all these ?
    I got this error "REP-1401: 'beforepform': Fatal PL/SQL error occurred." when i initialize the bind variable to a function (GetA)stored in Schema A ---> :P_A := GetA in the before_parameter_form of report trigger;
    anything wrong with the above assignment ?
    are there any difference between stored procedure like function, package in the database and those in in PL/SQL Library of report builder ???
    null

  • How to pass the values to stored proc using presentation variable in OBIEE

    Need your help regarding in resolving an issue in OBIEE 10.1.3.4.1
    There are 6 reports say ‘A’,’B’,’C’,’D’,’E’,’F’ in the same subject area.
    The reports are being configured with prompts using either the repository/presentation variables.
    One of the reports say ‘A’ has been configured to pass the values using presentation variables from the prompt in Advanced Tab of the report request to the stored procedure defined in the Execute Before Query section of the connection pool.
    After running another report ‘B’ in the same subject area, upon visiting the report ‘A’ view display error is being seen ( Please have a look below screen shot for your reference) .
    Speculate the issue is around presentation variables of report ‘A’ getting initialized even before running the report.
    Appreciate your earliest advise as this is a prod issue.

    Hi Prasad,
    I got your note, you should not use Session variable syntax to call presentation variable.
    you should use like @{AIC_PROJ_PLAT_SEQ_NO}
    One more thing: first test the variable AIC_PROJ_PLAT_SEQ_NO value then try to pass to SP.
    Hope this helps

  • Unable to pass the values to stored proc using presentation variable in OBI

    Hi All,
    Need your help regarding in resolving an issue in OBIEE 10.1.3.4.1
    There is an OBIEE requirement whereby two prompts need to be defined.
    1.     Textbox prompt
    2.     Drop-down prompt
    The dropdown values should be populated using textbox prompt. So, we have used presentation variable in textbox prompt and passing the same to select query of drop-down.
    Until this step, the report works just fine.
    Now, the value in both textbox and drop-down needs to be passed to stored proc.
    While trying to pass the values by using the presentation variable, the following error comes-up saying
    Session variable has no value definition.
    Note:Although the corresponding session variable has been set to default value,still the error appears.
    Please advise.
    Regards,
    Prasad

    "Session variable has no value definition" I'm assuming typo error and it should be presentation variable.
    Set default value for presentation variable that may work

  • How to find out the type of the value stored in a string variable?

    Hi,
    How do i find out the type of the value stored in a string variable?
    for example,
    I have a string variable str, in which the following type of values wil be stored
    1) Intger
    2) Long
    3) boolean
    4) Char
    Is there any method to find out the type of the value, anything like str.getType()?. Please kindly help me. Thanks in advance.

    Hi All, i'm sorry for the double posting, by mistake it occured.
    Thanks for your replies, i have a string variable str, in which the value is stored and i have another string variable type, in which the type of the value is stored.
    For example,
    String str = "15";
    String type = "Integer";
    Is there any way to verify whether the value stroed in str is of type stored in the variable 'type'. I want to write a method of type boolean, it will throw true of the value stored in str is of type 'type'. Thanks

Maybe you are looking for