Set an item's value

Good day,
I have a form with a Data Block and two items in the Data Block. The first item is a checkbox, while the second is an ID. I've set up a trigger on the ID item (POST-CHANGE) that should set the checkbox item if the ID has a valid system ID. The problem I'm having is that I can't seem to be able to set the checkbox. I need advice.
Data Block = VARREQ
Items:
USE_VAR_FLAG (valid values are "Y", "N")
VAR_ID (valid values are a number)
The code I've tried so far:
begin
:VARREQ.USE_VAR_FLAG := 'Y';
end;
This does not set the checkbox value.

Hi ThomasBoxall
As a result when the code triggers it only applies to the first value of the LOV and every subsequent check box is not being checkedit's not very clear to me but it's row by row the validation is made...
provide a resource on how to step through a LOV to check every checkbox in the LOV that has a valid VAR_ID?a check box is a form item has 2 values y or but when dealing with LOV u r dealing with db column compared to e.g. a form item to be validated or compared with in the WHERE clause statment in the record group when building a query (Record Group) of a List Of Value.
Any way,here is a link on How to Create a List of Values and all other forms basics for beginners from scratch.
For more visualization pls watchOracle Forms lesson 4 (create LOV)
Hope this helps...
Regards,
Amatu Allah

Similar Messages

  • HOW TO SET A ITEM DEFAULT VALUE  to today

    I have a item using select list and I like to set this item default value as
    today's date , such as "select to_char(sysdate,'YYYY-MM-DD') from dual"
    HTMLDB failed recongnize the default value, or throw error Error ERR-9132 Error in PLSQL expression for item default code, ...". I have tried each of 3 avaialable Default Value Types
    Per http://forums.oracle.com/forums/thread.jspa?messageID=443287, it is used to be doable, but the default value type (sql) is no longer avaialble in HTMLDB 2.0
    I would appreaciate it very much if anyone has successfully done this before, either set to today or current month

    Ching - Did you try a PL/SQL Expression using to_char(sysdate,'YYYY-MM-DD')?
    There have been no changes to the item default types available in HTML DB. The thread you referenced is for Oracle Portal, a separate and unrelated product.
    Scott

  • Generic proceeding for setting application item's value from javascript?

    For the moment, all I can think of is a javascript function calling an on-demand process that looks like this:
    function setVariableValue(pName, pValue){ 
    var gReturn;
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=odpSetVariableValue',0);
    get.addParam('x01',pName);
    get.addParam('x02',pValue);
    gReturn = get.get();
    get = null;
    odpSetVariableValue
    begin
    execute immediate ':' || wwv_flow.g_x01 || ' := ' || wwv_flow.g_x02;
    end;
    Is there an APEX function to do it without "execute immediate"?
    Igor

    Hello Igor,
    I think you can do the same thing without actually executing a PL/SQL Process (look here for an example).
    function setVariableValue(pName, pValue){
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=dummy',0);
    get.add(pName, pValue);
    var gReturn = get.get();
    get = null;
    (The Application Process dummy doesn't really exists...).
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/
    You can award this reply to your question by marking it as either Helpful or Correct ;-)

  • Setting an item value before print report in BI Publisher

    Hi,
    I am having an issue with setting a page item's value once a button (that prints a BI Publisher report) is pressed. The session state for the item is set, however because the page does not re-load no value appears in the item on the page.
    I am using a button as a page Item and using a Page Branch with the Branch Point set as On Submit: After Processing(After Computation, Validation, and Processing) with the Page set to 0 and the Request set to PRINT_REPORT=REPORT
    Is there any way to set the item value on the page before branching to the report?
    Your help is greatly appreciated.
    -Marsha

    Marsha,
    You can do that as follows:
    1- create a hidden text item (P20_date_hidden) with default value set to sysdate.
    2- for your button >> edit >> Buttom display attributes >> attributes >> type in : onFocus= "set_date();" (( note: am using onFocus because it takes places before onClick ))
    3- In your page >> edit >> HTML header >> type in :
    <script language="JavaScript" type="text/javascript">
    function set_date()
    v_date = $x('P20_DATE_HIDDEN').value;
    $x('P20_DATE_LETTER_SENT').value = v_date;
    </script>
    Hope this helps,
    Sam
    Please reward good answers by marking them correct or useful!

  • Parent Child Value Sets for Item Categories

    I've tried to set up parent-child value sets, not independent-dependent sets for Item Categories but in vain. So, if Item Category has 2 segments - Category & Sub-Category; Sub-Category only shows valid values for a category. For example, if Category is 19 (Tools), the LOV for 2nd segment would only show 28 (Large Tools), 29 (Heavy Tools) etc.
    Creating an independent-dependent combination displays all values for the independent & dependent sets.
    Just looking for help here.
    Thanks,
    Sanjib

    Karthik, Sandeep and Hugh
    Thanks for your responses. We greatly appreciate you taking the time to reply to this thread. My e-mail is [email protected], that is if you'd like to send any documents.
    Basically, this is what we were looking for -
    The category structure is
    Equipment 1 - Spare 1,
    Equipment 1 - Spare 2,
    Equipment 2 - Spare 1,
    Tools - Large,
    Tools - Small,
    etc.
    When selecting Codes for this structure, if I choose 'Equipment 1' for 1st segment, LOV for 2nd segment would only show 'Spare 1', 'Spare 2'. Similarly, If I choose 'Tools', I only see 'Large', 'Small' for Segment 2.
    Thanks,
    Sanjib

  • Exception on read or set UDF document lines value

    Hi All,
    have a big problem...
    I'm creating invoice documents from many and many delivery documents via DI API.
    In some cases, my addon gives an exception reading or setting UDF line fields.
    Here is the exception message:
    System.Runtime.InteropServices.COMException (0x80010105): The server has rise an exception. (Eccezione da HRESULT: 0x80010105(RPC_E_SERVERFAULT))
    in SAPbobsCOM.FieldClass.get_Value() in Morato.CreaDocFatturazioneMassiva.CopyUDFLineFields(String)
    or
    System.Runtime.InteropServices.COMException (0x80010105): The server has rise an exception. (Eccezione da HRESULT: 0x80010105(RPC_E_SERVERFAULT))
    in SAPbobsCOM.FieldClass.set_Value() in Morato.CreaDocFatturazioneMassiva.CopyUDFLineFields(String)
    The strange thing is that if I create an invoices from a little quantity of deliveries, there is no problem. The error seems to rise when I create an invoice from a huge quantity of deliveries.
    The code is:
    Private Function CopyUDFLineFields(ByVal oLineNum As String) As Boolean
            Dim i As Integer
            oDocFrom.Lines.SetCurrentLine(oLineNum)
            Try
                With oDocFrom.Lines.UserFields
                    For i = 0 To .Fields.Count - 1
                        Select Case .Fields.Item(i).Type
                            Case SAPbobsCOM.BoFieldTypes.db_Date
                                '// campi di tipo data
                                Select Case .Fields.Item(i).SubType
                                    Case SAPbobsCOM.BoFldSubTypes.st_Time
                                        '// campi di tipo ora
                                        If Hour(.Fields.Item(i).Value) <> "0" Or Minute(.Fields.Item(i).Value) <> "0" Then
                                            oDocTo.Lines.UserFields.Fields.Item(i).Value = .Fields.Item(i).Value
                                        End If
                                    Case Else
                                        If Year(oDocFrom.Lines.UserFields.Fields.Item(i).Value) <> "1899" And Year(.Fields.Item(i).Value) <> "1999" Then
                                            oDocTo.Lines.UserFields.Fields.Item(i).Value = .Fields.Item(i).Value
                                        End If
                                End Select
                            Case SAPbobsCOM.BoFieldTypes.db_Float
                                '// campi di tipo unità e totale
                                If .Fields.Item(i).SubType = SAPbobsCOM.BoFldSubTypes.st_Measurement Or .Fields.Item(i).SubType = SAPbobsCOM.BoFldSubTypes.st_Percentage Or .Fields.Item(i).SubType = SAPbobsCOM.BoFldSubTypes.st_Price Or .Fields.Item(i).SubType = SAPbobsCOM.BoFldSubTypes.st_Quantity Then
                                    oDocTo.Lines.UserFields.Fields.Item(i).Value = CDbl(.Fields.Item(i).Value)
                                End If
                            Case SAPbobsCOM.BoFieldTypes.db_Alpha
                                '// campi di tipo stringa
                                If Not String.IsNullOrEmpty(oDocFrom.Lines.UserFields.Fields.Item(i).Value) Then
                                    oDocTo.Lines.UserFields.Fields.Item(i).Value = .Fields.Item(i).Value.ToString
                                End If
                            Case SAPbobsCOM.BoFieldTypes.db_Numeric
                                oDocTo.Lines.UserFields.Fields.Item(i).Value = Val(.Fields.Item(i).Value)
                            Case SAPbobsCOM.BoFieldTypes.db_Memo
                                oDocTo.Lines.UserFields.Fields.Item(i).Value = .Fields.Item(i).Value.ToString
                            Case Else
                                '// altri tipi stringa
                                If Not String.IsNullOrEmpty(oDocFrom.Lines.UserFields.Fields.Item(i).Value) Then
                                    oDocTo.Lines.UserFields.Fields.Item(i).Value = .Fields.Item(i).Value.ToString
                                End If
                        End Select
                    Next i
                End With
                Return True
            Catch ex As Exception
                SBO_Application.MessageBox(ex.ToString & " - " & oDocFrom.Lines.UserFields.Fields.Item(i).Name.ToString)
                Return False
            End Try
        End Function
    Anyone have experienced something similar?
    Kind Regards,
    Paolo Caricasole.
    Edited by: Rui Pereira on Dec 23, 2008 4:26 PM

    Please refer to note#1235603
    SAP Notes: [http://service.sap.com/notes|http://service.sap.com/notes]
    Replace:
    oDocTo.Lines.UserFields.Fields.Item(i).Value
    with:
    Document_Lines oLines = oDocTo.Lines
    oLines.UserFields.Fields.Item(i).Value
    Regards, Yatsea

  • Could not find selected item matching value "null" in CoreSelectOneRadio

    Hello,
    I get the following error with my selectOneChoice components:
    WARNING Could not find selected item matching value "null" in CoreSelectOneRadio[UIXEditableFacesBeanImpl, id=dyna_2709976_11]
    It seem that the component looks for a selectItem object qith its value set to null, so I tried to add one with a null value to no avail. The error don't cause any problem on the rendered page but it might spam the log when many users will be connected. Anyone every got this error and found a fix to stop it from appearing?
    Regards,
    Simon Lessard

    you said you're using selectOneChoice but the error says radio. Is the information correct?

  • Could not find selected item matching value "New" warning message in ADF

    Hi,
    I have a selectOneChoice1 for a field which has the following fixed values in it. And while creating it, I selected the 'SelctionRequired' option so that this field will always have a value.
    New
    Pending
    Completed.
    While navigating to this page, I am trying to set the value to 'New' (Retrieved from the DB) in the backing bean. But when the page is rendered, the above field is empty with the above options in the list and jdev has the follwing error message in its log.
    WARNING: Could not find selected item matching value "New" in CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=selectOneChoice1]
    Can any one help me with this issue?
    Thanks,
    Priya

    The value of a list binding is the zero-based integer position in the list that is selected, not the actual underlying value.
    The simplest way to set the value of an attribute is to use an attribute binding (which can be bound to the same attribute as the list binding). When you set the value of an attribute binding, it sets the value as you supply it. Otherwise, you'd need to set the list binding's value to the numerical "slot" number of the one you want to change the value to.

  • Main Item net value showing as zero by condition type R100.

    Hi Experts,
    I am configured free goods, maintained condition record for exclusive free goods.
    but in sales order free goods item is not populating and when i see the analysis the requirement 55 not met.
    I removed the requirement 55 and i saved it.
    Still in the sales order the  free goods exclusive item not populating.
    and i find that main Item net value showing as zero by condition type R100.
    Why system showing the main item amount as zero by condition type R100?
    Thanks in advance.

    HI ram reddy
    you have to maintain R100 requirement -55 it should be there
    also Alternative Condition Base value - 28(100% discount)
    check your main pricing procedure having conditon type R100 or not if it is not there then maintain
    conditon record in VBN1 for NA00 check all the setting(calculation rule)
    activate free goods pricing correctly(NA0001)
    save it now try
    Regards,
    Krishna.
    Edited by: kris_hna on Jul 14, 2011 11:13 AM
    Edited by: kris_hna on Jul 14, 2011 11:31 AM

  • Is there a way to obtain the text item's value when the mouse pointer at?

    Hi,
    Is there a way to obtain the text item's value when the mouse pointer at? Mouse pointer may be located somewhere out of current record and even out of current block.

    There is a when-mouse-over trigger and that works fine in client-server mode for Forms 5/6/6i, but that is less indicated when deployed using Application Server.
    In that trigger you may write whatever code is necessary, restricted package procedures.
    Still, I think, for your case, if you do not have to deal with a multi-record block, you should use the HINT property for that item and set_item_property with the HINT argument for that item in order to set the hint to the item's value - this should set_item_property should be called on the when-new-record-instance .

  • How stop File Browse item losing value when a validation occurs

    G'Day Apex gurus,
    I am using Apex 3.1.0 and Firefox in an XP PC and have a file browse page item on my page but whenever i experience a validation error on the page, the value entered into this box is lost.
    Every other field on the page retains its entered value, but the file browser item loses its value.
    This is frustrating because the user will have to reselect the file.
    Is there a way to retain the value upon a validation error?
    I appreciate any assistance with this
    Carlos

    Hey creyes,
    I don't think this is possible.
    Because of security implications (scripts setting the value, and then attempting to retrieve files of your computer) the value of the fileupload form field is read only. Therefore you cannot set, or reset the value.
    A solution could be that you make validations with javascript if possible (but keep validations on the database side also!).
    Kind regards,
    Oli

  • Set more then 3 values in link

    Hello,
    i am using oracle 10g apex 3.2.
    I created a interactive report,with shows 5 columns in page 1.
    Now 2nd column i made it as link.
    On clicking that link it goes to page 3.
    When i click the link i want to set few items of page 3 with page 1 values.
    But in the column link(report attributes) of the interactive report i could see only 3 items can be set.
    What to do if i need to set more then 3 values?
    For More info on what i am doing---------
    Page 3 is having a form whose values i need to fill from page 1.A user need to click the link i.e. col2 on page 1 and then it goes to page 3 and could be able to see some values in the form of page 3 already filled.I want to send total 6 values.
    Thanks
    Swapna

    Hi,
    Option 1>>>
    When you click link on interactive report , send the primary key to page 3 which contains the form.
    In page 3 add a on load , before header process which will populate the other items based on the primary key value..
    Option 2>>>
    You can enter comma separated item names / values in the link tab of interactive report..
    eg. Name Field you can P1_ITEM1 , P1_ITEM2 , P1_ITEM3 and in value field you can enter the corresponding values eg.. #field1# , #field2# , #field3#
    Regards,
    Shijesh
    Please reward the answer if was helpful/correct

  • How i can set dropDown item to 6th item from java code ?

    Hi
    Thank you for reading my post.
    how i can set dropDown item to 6th item from java code ?
    i have the value field of database and i can use it to set selected item of DropDown.
    so : can i use value field to set the selected item ?
    Thank u.

    Hi,
    Please go through the following thread which discusses about setting teh selected item for a dropdown:
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=50697
    Hope it helps
    Cheers
    Giri

  • How to use P_SESSION.GET_VALUE_AS_VARCHAR2 in MDform item default Value

    I have a master detail form based on two tables. In the DETAIL_BLOCK section I have an item named 'APPROVAL_STATUS' based on the column of the same name in the underlying table. I have an unassociated textbox named CURR_APPROVSTAT in the detail form for which I would like to set it's default value to the current value of APPROVAL_STATUS when the master detail form is opened in %3D mode via a hyperlink.
    I have tried using the p_session.get_value_as_varchar2 in the default value field of the CURR_APPROVSTAT item, but it generates errors on run.
    EX:
    Item CURR_APPROVSTAT
    default value field
    p_session.get_value_as_varchar2(
    p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'APPROVAL_STATUS')
    Default Value type:
    Function returns varchar2
    on run, it generates error that p_session must be declared (I get the same error if I use portal.p_session... also).
    default value field
    select p_session.get_value_as_varchar2(p_block_name => 'DETAIL_BLOCK', p_attribute_name => 'APPROVAL_STATUS')from dual
    Default Value type:
    SQL returns varchar2
    on run, it generates and error that a right parenthesis is missing.
    I have also tried using the following in the Additional PL/SQL - before displaying form:
    p_session.set_value
    (p_block_name => 'DETAIL_BLOCK'
    ,p_attribute_name => 'CURR_APPROVSTAT'
    ,p_value => p_session.get_value_as_varchar2(
    p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'APPROVAL_STATUS')
    on run, this generates the error identifier 'P_SESSION.GET_VALUE_AS_VARCHAR2' must be declared
    My questions are:
    1) is it possible to use the p_session.get_value_as_varchar2 in the default value field?
    2) If yes, then what if the proper syntax
    3) If no, can I set this value when the MD form opens from the additional pl/sql triggers, and if so, what is the syntax?
    any assistance you can offer is greatly appreciated.
    Sincerely,
    ARM

    In my detail block I have 10 rows displaying that may or may not have data after querying. To set the default value in the detail block, you have to set the index value of p_session.set_value. Since I don't know how many rows are already populated, I'm setting the default value to all 10 rows. Is there a better approach?
    Here's my code example, which I've placed in the additional PL/SQL section before displaying the form...
    DECLARE
    l_district_id VARCHAR2(7);
    BEGIN
    l_district_id := p_session.get_value_as_varchar2
    (p_block_name => 'MASTER_BLOCK',
    p_attribute_name => 'A_DISTRICT_ID');
    FOR i in 1 .. 10 LOOP
    p_session.set_value
    (p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'A_DISTRICT_ID',
    p_value => TO_CHAR(l_district_id), p_index => i);
    END LOOP;
    END;

  • Change item Label based on Another item's value

    Hi guys,
    I need to set an item label (A) based on the value of another item (B). I did the following:
    I Created a dynamic action.
    When B changes:
    1- submit the value of B
    2- Refresh item A
    The label of the item A is : myitem &B.
    Any ideas ????
    Best Regards,
    Fateh

    Fateh wrote:
    Ok... Thanks a lot... but before closing the thread and for better understanding.
    I put this code on Execute when Page Loads:
    $("#P1_A").change(function(){
    if($v(this)=="Rent"){
    $('#mylabel > label > span').text('Is it for Sale also');
    }else{
    $('#mylabel > label > span').text('Is it for Rent also');
    }However, the label does not change. Any ideas why this is not working????
    Regards,
    Fateh
    $v(this)
    you are mixing jquery and apex API, it won't work
    and missing *});* at the end, and when adding to the page load you should wrap them in $(document).ready( code here.... });
    $(document).ready(function () {
         $("#P1_A").change(function () {
              if ($(this).val() == "Rent") {
                   $('#mylabel > label > span').text('Is it for Sale also');
              } else {
                   $('#mylabel > label > span').text('Is it for Rent also');
    });

Maybe you are looking for