The value of data_block item can be stored in a variable?

Hi all I have master and detail form
i need to insert data by scanning the barcode
and i need to select a form_item dynamically please guide how
problum desc:-
My Table desc is like this
SQL> desc gin_detail1;
Name                                      Null?    Type
ID                                                 NUMBER
SALE_ORDER_ID                                      VARCHAR2(150)
PROD_ID                                            VARCHAR2(20)
PROD_NAME                                          VARCHAR2(100)
COLOR                                              VARCHAR2(20)
XS                                                 NUMBER
S                                                  NUMBER
M                                                  NUMBER
L                                                  NUMBER
XL                                                 NUMBER
PCS                                                NUMBER
IF    :gin_detail1.barcode = a THEN
SELECT SALE_ORDER_NO,prod_id,style,color,1 INTO
       :gin_detail1.sale_order_id,:gin_detail1.prod_id,
:gin_detail1.prod_name,:gin_detail1.color,:gin_detail1.XS from sale_order_barcode1 where barcode=:gin_detail1.barcode;
end if;i need to change the :gin_detail1.xs dynamically as per barcode
If BARCODE is 241040713BLACKS then :gin_detail1.XS
if BARCODE is 241040597BLACKL then :gin_detail1.L
like these for all the fields
Please Guide
Thanks ANd Regards
Vikas

Hi Vikas
i need to select a form_item dynamically u can't
But u can only assign the value of a form item into a variable then do what ever u want with it...
if i do recognize ur problem right then use the following..
> v_value := :form_item;
what error r u getting from the following select statment ?
the assign statment should equal the number of the variables or menu items ur trying to assign & MATCH IT as follows
IF    :gin_detail1.barcode = a THEN
SELECT SALE_ORDER_NO  ,prod_id,  style,  color,  XS                                                
INTO  :gin_detail1.sale_order_id,  :gin_detail1.prod_id,  :gin_detail1.prod_name,  :gin_detail1.color,  :gin_detail1.XS
FROM sale_order_barcode1 where barcode=:gin_detail1.barcode;
END IF ;so u missed
XS into :XS besides why u select the value 1 & insert it into :XS ?
XS
need to change the :gin_detail1.xs dynamically as per barcode
If BARCODE is 241040713BLACKS then :gin_detail1.XS
if BARCODE is 241040597BLACKL then :gin_detail1.L
like these for all the fields
DECLARE
v_result1    NUMBER ;
v_result2     NUMBER ;
BEGIN
If  :gin_detail1.BARCODE = 241040713BLACKS THEN
v_result1 := :gin_detail1.XS ;
elsif :gin_detail1.BARCODE is 241040597BLACKL THEN
v_result2  :=  :gin_detail1.L;
and so on...
END;
Note : u have 2 compare & assign in the if statment within the same datatype otherwise u have to use to_char() or whatever...
Hope i could get ur point & could my answer help u ...
otherwise pls send the error u r getting and re-state the problem u mean exactly.
Regards,
Abdetu...
Edited by: Abdetu on Jan 17, 2011 5:13 AM

Similar Messages

  • Can you calculate multiple text boxes to achieve a total value?  If so how is that done?  I am trying to create a order form where multiple items can be purchased but i would like the values of each item to calculate so I can achieve a total value.

    Can you calculate multiple text boxes to achieve a total value?  If so how is that done?  I am trying to create a order form where multiple items can be purchased but i would like the values of each item to calculate so I can achieve a total value.

    Hi sashby51,
    I've moved your discussion to the PDF Forms forum--the folks who visit this forum regularly should be able to point you in the right direction.
    Best,
    Sara

  • Online Store 1.0  - which process set the value of App Item 'FULLNAME'

    Hi,
    I just very curious about which process set the value of App Item 'FULLNAME' ini the packaged Apex App - Online Store 1.0 .
    At Navigation Bar, there is a entry named "If you are not &FULLNAME., Click here |". However I can't find how the app set this application item value in any process when login.
    any idea, I will be very appreciated.
    Thanks in advance.
    PPMonkey

    Check the post-authentication process in the current authentication scheme and the call to ols_getname.
    Scott

  • How to set the value of application item using pl/sql in application process

    Hi guys,
    I want a global variable (application item) whose value will be set at the start when a user logs in to the application. The value will be retrieved from database using a sql query. I do not know the exact syntax to set the value of application item in application process. Also i want to know in which type of application process should i use to set the value of application item when a user starts a session. The value of application item varies from user to user.
    Please help.
    I am using apex 4.2
    Regards,
    Waqas

    You can use the application item as bind-variable with its name. ie. your application item is named G_MY_APPLICATION_ITEM, then you can access/set it using :G_MY_APPLICATION_ITEM.
    For example
    BEGIN
        -- assign like a variable
        :G_MY_APPLICATION_ITEM := 'LARRY';
        -- use in a SQL statement
        SELECT WHATEVER_COLUMN
          INTO :G_MY_APPLICATION_ITEM
          FROM MY_TABLE
         WHERE USERNAME = :APP_USER
    END;
    Peter

  • Forming a report query dynamically with the value of an item

    Hi Gurus,
    We wanted to create a report based on the value of an item in the page.
    For example
    There is a text box named p1_table depending on the value of this item the query of the report should change
    1) when p1_table = emp then report query should be select * from emp
    2) when p1_table = dept then report query should be select * from dept
    I tried doing this using
    select * from :p1_table and select * from v('p1_table') , it is not working.
    Kindly help me in achieving the requirement.
    Thanks & Regards,
    Vikas Krishna

    Hi Vikas,
    You have to do this as a report based on a function that returns the query as a string. You build up the string dynamically in the function.
    Regards
    Andre

  • How to access the value of application item in javascript

    How to access the value of application item in javascript?

    Hi,
    One way
    var myVariable = '&MY_APP_ITEM.';Br,Jari

  • How to Visible/Hide an Item based on the value of another Item

    Hi
    I need to visible and hide a textitem based on the value of another item.This form has 3 blocks, and the both item is in the first Master Block.
    My code is:
    if :RECORDTYPE=7 then
         Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_TRUE);
         Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_TRUE);
    ELSE
         Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_FALSE);
    Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_FALSE);
    :BLOCK.ITEM:=NULL;
    end if;     
    I wrote the code in the Validate Trigger, but not working when moving Next Record & Previous Record
    Thanks in advance
    Rizly

    Read the 'Propagation of Property Changes' section towards the end of the page for Set_Item_Property in the online help. I'm not sure what you mean by locking automatically but perhaps it's because of this.
    You should also ensure the item you're setting to invisible is not the current item (check :system.cursor_item and go to a different item if necessary).

  • Why the values of these parameters can not be listed?

    Why the values of these parameters can not be listed?
    SQL> show parameter nls_time_format;
    NAME                                 TYPE        VALUE
    nls_time_format                      string
    SQL> show parameter nls_date_format;
    NAME                                 TYPE        VALUE
    nls_date_format                      string

    qkc wrote:
    Do you mean the values are NULL? Why the default value not liested here.This is from my sandbox 10.2.0.4 database on linux. This was built just a few days ago and is absolutely default in all respects:
    SQL> show parameter nls
    NAME                                 TYPE        VALUE
    nls_calendar                         string
    nls_comp                             string
    nls_currency                         string
    nls_date_format                      string
    nls_date_language                    string
    nls_dual_currency                    string
    nls_iso_currency                     string
    nls_language                         string      AMERICAN
    nls_length_semantics                 string      BYTE
    nls_nchar_conv_excp                  string      FALSE
    nls_numeric_characters               string
    nls_sort                             string
    nls_territory                        string      AMERICA
    nls_time_format                      string
    nls_time_tz_format                   string
    nls_timestamp_format                 string
    nls_timestamp_tz_format              string
    SQL>Besides, it is a bad idea to depend on the defaults anyway. There are so many places they can be overridden that it is foolish for an app to depend on it. Rather, you should always be using (properly) the to_char and to_date functions to specify the formats at the individual sql statement. So the 'default' values become totally irrelevant.

  • 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>

  • Condition that checks the value of an Item derived from a select list

    I want to conditionally display and hide items in a region based on a select list item.
    Some items will display when the select list is at the default (%null%) and others will be displayed when the select list user selects from the select list.
    The display is then updated when the "SAVE" button is pressed and the page processed.
    How do I test the select list item to be null. The condition looks like this;
    Type: PL/SQL Expression
    :P1_SELECT is null
    I also tried, :P1_SELECT is not null and :P1_SELECT = '%nul%'.
    The latter changed the condition to :P1_SELECT = ''
    How can I test the valu in P1_SELECT?
    tia,
    Sam
    Message was edited by:
    After a long day I saw that I did not write the condition correctly. Mea culpa.
    slavanaway

    I had the problem wrong.
    The issue was a second field that could have a Y or N or null. When I checked it in PL/SQL expression as
    :P_YN != 'Y' and :P_SELECT is null
    assuming the null condition would resolve as != 'Y' I had to do an explicit check as
    (:P_YN != 'Y' or :P_YN is null) and :P_SELECT is null
    That fixed it.... I like null and I hate null
    Thanks for the reply

  • Populate the values  to  list item based on a check box

    Hi,
    How can i populate the values from a field on the form to one list item based on a check box,
    the pseudo code is like,
    if checkbox = checked then
    populate the particular field value to the list item;
    checkbox = unchecked;
    next_record;
    end if;
    Thanks
    Bcj

    To populate a Tlist item, do the following:
    1. Create a TLIST item in the EMP block. and give it a height to accommodate several names.
    2. Using the TLIST property pallete:
    a. Set the Column Name property to EMPNO
    b. Click on the Elements in List property. Delete each List Element and delete each List Item Value. If you don't do this you will get an error when you compile.
    3. Create a record group using this query:
    select ename, to_char(empno) from emp
    4. Create a WHEN-NEW-FORM-INSTANCE trigger, and place this code inside the trigger:
    Declare
    err_num number;
    Begin
    clear_list('YOUR_TLIST');
    err_num := populate_group('YOUR_RECORD_GROUP');
    If err_num = 0 Then
    populate_list('YOUR_TLIST', 'YOUR_RECORD_GROUP');
    Else
    message('Error populating Tlist');
    message('Error populating Tlist');
    End If;
    End;
    5. Compile and run the form. The ENAMEs will appear in the TList, and each ENAME will have a value equal to its EMPNO.

  • JDev 9.0.3.5 : How to get the value of an item on a page in the controller

    Hi,
    In the processFormRequest part of my page controller, when the user clicks on Apply, I need to pass the value(s) entered by the user, to a PL/SQL stored procedure. The user enters a value for a field called "FirstName" on the page. I then need to pass this value to a stored proc. But the following code gives me a java.lang.ClassCastException on the 2nd line here. What am I doing wrong?
    String firstNameStr = "";
    OATextInputBean firstNameBean1 = (OATextInputBean)webBean.findIndexedChildRecursive("FirstName"); // This line throws exception!!
    OAWebBean firstNameBean = (OAWebBean)pageContext.getWebBeanValue(firstNameBean1,firstNameStr);
    Any help is greatly appreciated.
    Kind regards
    Tessa Lillie

    rather use
    String firstNameStr = pageContext.getParameter("FirstName");

  • How to populate the value of SHUTTLE item from MULTISELECT item

    Hi,
    I am have following 2 items
    P1_TEXT1 - multiselect
    P1_TEXT2 - shuttle
    I have populated the value of P1_TEXT1(multiselect) and then want to assign the same value to P1_TEXT12 (shuttle)
    I am using following Javascript function to assign the value of P1_TEXT1 to P1_TEXT2 but it's not working??
    $x('P1_TEXT2').value = $x('P1_TEXT1').valuethanks,
    Deepak
    Edited by: Deepak_J on Dec 4, 2009 3:28 PM

    Hi Jari,
    I modified the earlier script as shown below. It's working perfectly fine as per my requirement.
    Pl let me know if these changes are fine OR is there is any modification we need.
    <script>
          var ob  = $x('P1_TEXT1');
          var ob2 = $x('P1_TEXT2_LEFT');
          var ob3 = $x('P1_TEXT2_RIGHT');
          // added this piece as per your suggestion..
          var g_myShuttle = null;
          if(!flowSelectArray){
            var flowSelectArray = [];
          flowSelectArray[flowSelectArray.length] = "P1_TEXT2_RIGHT";
          g_myShuttle = new dhtml_ShuttleObject 
          ("P132_HDWR_DEVCE_ID_LEFT","P1_TEXT2_RIGHT");
          // Remove all values
          g_myShuttle.remove_all();   
          // added this FOR LOOP, which will make every thing on the LEFT side unselected initially
          for (var j = 0; j < ob2.options.length; j++)
              ob2.options[j].selected = false;
          for (var i = 0; i < ob.options.length; i++)
                 for (var j = 0; j < ob2.options.length; j++)
                    if(ob2.options[j].value == ob.options.value)
    ob2.options[j].selected = true;
    var g_myShuttle = null;
    if(!flowSelectArray){
    var flowSelectArray = [];
    flowSelectArray[flowSelectArray.length] = "P1_TEXT2_RIGHT";
    g_myShuttle = new dhtml_ShuttleObject
    ("P1_TEXT2_LEFT","P1_TEXT2_RIGHT");
    g_myShuttle.move();
    </script>
    Thanks,
    Deepak                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Submitting the value of an item with session state

    Hi,
    I've a Master / Detail Form on different pages, like master report page no.19, master form page no. 20 and detail form page no. 21. I've created this form using Form, master detail form wizard. I've set deptid as a primary key in master, and foreign key in details table. In page 21, i've set the source for deptid, source used : Always, replacing any existing value in session state, source type : Item (application or page item name), source value : P20_DEPTID. While executing the form deptid is showing the value, but, while submitting of the form, it's not saving in the table. What will be the problem??
    Thanks and Regards,
    Sudha.

    Sudha,
    OK.
    Go to the pagedefintion in page 20, click on the wordt report (of your master form).
    You will get a new screen.
    Click on the pencil-icon of your column.
    Again a new screen.
    Select the six tab (it's called LINK).
    Enter item-name and value something like :p21_dept_id and #DEPT_ID#
    where P21_dept_id is the item of the form for the dept_id
    Hope this helps.
    Leo

  • Where are the web templetes, web items and queries stored?

    Hi,
    I have created many reports using Web Application Designer and Query Designer, Now I want to get these reports and querys in my webDypro program, so i think first i must find out where can i find them, anybody know which table store the web templetes ,web items and queries?

    hi Jacky,
    query
    RSRREPDIR, RSZCOMPDIR
    (other tables : RSRREPDIR, RSZRANGE, RSZELTXREF, RSZELTTXT, RSZSELECT, RSZCOMPDIR, RSZELTDIR
    RSZCOMPIC, RSZELTPRIO, RSZELTPROP, RSZELTATTR, RSZELTTXT, RSZCALC, RSZCEL, RSZGLOBV)
    webtemplates
    RSZWTEMPLATE
    web items
    RSZWITEM                       Header Table for BW Web Items
    RSZWMDITEM                     BW Web Metadata: Template Item
    hope this helps.

Maybe you are looking for

  • Startup MacOS window popup

    Hey everyone, Just a quick question, I don't think it's too serious of a problem for me, but recently when starting up my mid-2009 MacBook Pro, I've noticed that the 'MacOS' window always pops up after logging into my account, it hasn't become that m

  • Images in texts are blinking/flashing in iOS7

    I recently am having an issue with images/pictures in text message blinking/flashing and not a static picture.  What is causing this? Thanks.

  • Tagged Interface

    What is actually meant by Tagged Interface ? I am writing a class which is implementing an interface. can i make the interface such a way that its functions are not optionally implemented in the implementing class. My doubt is that we make implements

  • Looking to address vulnerabilities in SunOne 6 1

    Hi, Our security team found the following vulnerabilities: 1)Disable TLS Renegotiation - SP 17 takes care of this 2)Add the HttpOnly to all cookies 3)Add the Secure flag to cookies sent over SSL 4)Upgrade to latest SSL (I am assuming I can just downl

  • How do i change the platform for elements from windows to Mac?

    I Bought photoshop elements a while back for windows. I just bought a Macbook & would like to know how to download to my macbook with the right platform. Thanks in advance.