How to write a checkbox value in items

Hi there,
is there a way to write a value belonging to a checkbox in an item? [apex 4.2]
Lets say I have the following statement :
SELECT TRUNC (SYSDATE, 'MON')+rownum-1 as DAYS
FROM DUAL
CONNECT BY LEVEL <= 31
Now I want to add a checkbox and this checkbox should write all checked values in a Page Item called P5_DAYS
And I want that these values are deleted if the checkbox is unselected.
Is there a way to do this (maybe without jquery?). Does Apex 4.2 has some built in features to handle this?

I've used few (if any) plug-ins so I'm helpless there. If this were a simple page item like P3_POSITION, then if the page is submitted so P3_POSITION has a value, that value can be referenced on any page as :P3_POSITION (or &P3_POSITION. (include period)).
To clarify, the value is stored in the session when the page is submitted. If you can't submit the page because you don't want all the values updated int he session than there are ways to submit the value of selected items.
Is that what you want to know?
Howard

Similar Messages

  • How to bind a checkbox to an item

    I started a small program to add a feature to the item master data. I just add a checkbox to the form but I don't know how to link that checkbox to the Item master data. What would be the best solution considering my source code:
    If pVal.EventType = et_FORM_LOAD And pVal.Before_Action = False And pVal.FormType = 150 Then
            Set oForm = SBO_Application.Forms(FormUID)
            Set oItem = oForm.Items.Add("EVOSS_Cut", it_STATIC)
            oItem.Top = 68
            oItem.Width = 80
            oItem.Left = 448
            Dim oTextField As SAPbouiCOM.StaticText
            Set oTextField = oItem.Specific
            oTextField.Caption = "Cut Item"
            Set oItem = oForm.Items.Add("EVOSS_Cut2", it_CHECK_BOX)
            oItem.Top = 68
            oItem.Left = 430
            oItem.Width = 20
            Dim oCheckbox As SAPbouiCOM.CheckBox
            Set oCheckbox = oItem.Specific
        End If
    Thanks a lot

    Vicent,
    add a userdatasource to the userdatasources collection of the form. Then bind your checkbox to the userdatasource.
    Generally, you might consider not creating controls via code (unless necessary for dynamic control creation). Use srf files in order to update an existing form. This way is much faster. It also is a lot easier to adapt to changes - no need to touch the source code.
    See the SAP samples or the TechDemo AddOn (/people/lutz.morrien3/blog/2004/09/21/sap-business-one-techdemo-addon-beta-out-now-and-it-is-free) for sample code.
    HTH Lutz Morrien

  • How to get the checkbox value

    Hi,
    i am working in Oracle APEX. Can anyone tell me how to get the checkbox value Thru Pl/sql Procedure.
    Ex:
    if i have three users like 1) super admin 2) HR 3) user i am giving different grants to all. there s a check box i used if HR selected three grants i have to get the checked value from my procedure and put into a table in a single column.
    grants :
    1)user creation
    2)salary details
    3)Attendance details
    4)Allowance
    5)contacts
    if its checked i am returning 1 not checked i hav to return 0
    in my table i ahv to store 10111 like that......
    Edited by: user12356342 on Dec 16, 2009 3:33 AM

    Hi,
    As a starting point, look at: [http://download-uk.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/check_box.htm#CHDCGIFA] as this explains how to use checkboxes on forms and reports
    Andy

  • How to set field checkbox values based on another field

    I'm trying to provide the user with the ability to check one box "Check All" which would then set the check boxes for a section to the same value as shown in the example.  Anyone know how I can accomplish this?
    Thank you.
    Example
    General Category A     [  ] Check All
         [  ]  Item 1
         [  ]  Item 2
         [  ]  Item 3
         [  ]  Item 4
    If user selects "Check All", all the Items in the list for "General Category A" are then checked automatically.

    You can create a document level function to check a series of check fiels as long as they all have the same checked value.
    // document level function that can be used for many sections
    function CheckAll(aFields, sChecked) {
    // test to see Check All box for being checked
    // and if checked set to aFields to checked value
    // otherwise clear fields
    if(this.getField(event.target.name).value == 'Off') {
    // field unchecked
    this.resetForm(aFields); // clear the fields
    // end box not checked
    } else {
    // check all box has been checked
    // loop through the fields to check
    for (i = 0; i < aFields.length; i++) {
    // all fields are assumed to have a value of 'Yes' when selected
    var f = this.getField(aFields[i]); // get field for element i
    f.value = sChecked; // set to checked value
    } // end loop to check
    // end checked
    } // end unchecked
    } // end CheckAll function
    // end document level function
    You can then add a mouse up aciton for the check all check box:
    // mouse up action for check all check box
    // define array of check box fields to process
    var aSecFields = new Array('Item 1', 'Item 2', 'Item 3', 'Item 4');
    // call CheckAll function
    // passing the array list of field names and checked value
    CheckAll(aSecFields, 'Yes');
    or you can use 1 line of executable code:
    // mouse up action for check all check box
    // call CheckAll function
    // passing the array list of field names and checked value
    CheckAll(['Item 1', 'Item 2', 'Item 3', 'Item 4'], 'Yes');

  • How to write array of values to cluster of indicators(tank sliders)??

    I am trying to write a 1-D array of values to thier corresponding 8 tank sliders.
    So each element of the array will be displayed as the value of the slider.
    How can I do this?
    It works if you display it to a cluster of numeric values, but not the sliders.
    I also tried writing the array to the "value" property  of the each of the sliders, but still doesn't seem to work.
    Any suggestions?
    Solved!
    Go to Solution.

    001,
    How did you create those sliders? They are actaully clusters of two elements, both of which appear to be identical sliders sitting on top of each other.
    That is probably why you are having so much trouble wiring your data to them.  I suggest that you create a new cluster with standard sliders.  Then you can use the Array to Cluster primitive to move the data.
    Two cautions: 1. The Array to Cluster defaults to 9 elements in the cluster regardless of the number of elements in the array.  Pop up on the cluster output terminal to change the number of elements if needed.
    2. You apparently added items to the cluster out of order.  The cluster order is important if you want to get the data to the right places.
    Also, it would be much easier for us to test your code if you included some data in 2D Array Input.  Put the data in there then Edit >> Make Current Values Default. Then save.
    Lynn

  • How to write rfc when value change in the screen (browser) in webdynpro.

    Hi,
    I want to know how can i write an RFC when screen value change in webdynpro. I already designed a rfc where all the value can be seen in the webdypro screen. Now when user change the value how can i pick the changed value in R/3 so that i can save it into the respective database.  Please send some code for understanding it easily as i am new to this field.
    Regards
    Deep

    Hi Deepak,
    Though I dint understand your requirment properly but as it is raised in Web Dynpro forum I considering that you want to send the data filled by the user to your backend using RFC calls. For this purpose you can refer to this two documents available on SDN.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20a%20web%20dynpro%20application%20accessing%20abap%20functions.pdf">Tutorial 4</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d352a790-0201-0010-5082-b1a608d22b6c">Tutorial 5</a>
    Regards
    Sid

  • How to write Lower case value to the upper case value in SMARTFORMS

    How to change the from lower case to Upper case in SMARTFORMS
    Ex. india to INDIA

    hi,
    chk this.
    DATA: T(10) VALUE 'AbCdEfGhIj',
    STRING LIKE T,
    RULE(20) VALUE 'AxbXCydYEzfZ'.
    STRING = T.
    WRITE STRING.
    TRANSLATE STRING TO UPPER CASE.
    WRITE / STRING.
    STRING = T.
    TRANSLATE STRING TO LOWER CASE.
    WRITE / STRING.
    STRING = T.
    TRANSLATE STRING USING RULE.
    WRITE / STRING.
    Output:
    AbCdEfGhIj
    ABCDEFGHIJ
    abcdefghij
    xXyYzZGhIj
    reward points if useful...
    -Umesh

  • How to store the checkbox value in the database?

    i want to store the value of the checkbox iwhich i tick in the database. how do i do it?
    Plz help.

    hi try this
    <input type="checkbox" name="check" value="1">
    <input type="checkbox" name="check" value="2">
    <input type="checkbox" name="check" value="3">
    at the back end form(jsp/servlet)
    String check[]=request.getParametersValues("check");
    u should iterate that array,then insert into table ........
    only selected check box values will be taken.....

  • How to write ticked checkbox data in a servlet to a flat file

    I display data on the screen with check boxes beside each name. When i check the neccessary check boxes how can i write only the cked ones to a text file

    I display data on the screen with check boxes beside
    each name. When i check the neccessary check boxes how
    can i write only the cked ones to a text fileTWO THINGS: If you ALREADY have data in the textfields/textareas BEFORE you check the checkbox, then have an Actionlistener ready for the relevant checkbox, so that as soon as its checked:
    //In the action listener for the checkbox
    String the_data = jTextField.getText();
    //Now call your serializer
    If you dont have data ready, and you put it on and then check the checkboxes you want or you check the checkbox to enable its jtextfield, then you'll need some other mechanism to activate the serialization through the actionlistener, like a button.
    In either case, its the same old story......an ActionListener that just calls a serialization mechanism for a simple string into a file.

  • How to Strore Selected Checkbox value in database

    Hi all,
    there are 2 dependent tables,
    1)category tabel( parent)
    2)attribute table( child)
    On selecting particular category I should get its corresponding attribute value .I am implemented this via PPR.
    i have corresponding SelectBooleanCheckBox for all attribute values in table, where i need to click and on clicking submit button it will store in database.
    i am not able to find the proper way how i need to implement this...
    Did any one idea about this.

    Hey,
    I just did this myself.
    Drag the collection from the data collection palette and make a table. Then go into the structure pallette and select the inputText element for the attribute you want and click convert, then select selectBooleanCheckbox.
    That should work. Don't forget to tell the table to include a submit button.
    A problem I have with this though is that the checkbox will always show as unselected even if the values in the table behind it make it so it should be otherwise. Frank linked me to an example that fixed that but I haven't been able to get it to work with mine yet.

  • How to write a numeric value to a plc register using a radio button

    I'm want display a HOA (HAND/OFF/AUTO) on my screen. Lookout is connected to a Allen Bradley PLC. I am trying to write to a "N" register. I want to write a zero to open all (eg) N7:10 bits, writing a one (1) will close a contact N7:10/0 and writing a two (2) will close N7:10/1 etc. How do I do it? Can I use a radio button and if so, how?

    ICI,
    Just wanted to let you know that you have posted your question in the
    MATRIXx part of the forum.  There is a specific board for
    Lookout.  If you repost your message there you will be more likely
    to get a good answer.
    Carl L
    National Instruments

  • How to auto fetch the value of item based on remaining columns in same page

    Hi,
    i have 7 items in a same form
    like employee name,employee number ,department,designation,email address and contact address
    if i entered employee number means i need to automatically display the corresponding employee details in other columns
    Please reply asap.............
    Regards,
    Kani

    Hi Scott,
    I got the solution but i assigned the default values for weight,courier charge,packing charge,other charges  and net charges to ZERO...
    and page items to be submited--weight,courier charge,packing charge,other charge..
    If i gave --page items to be submited--weight,courier charge--net charge ll be display with out assigning default values(ZERO) for any item..fr tat wat i have to do...
    Thanks,
    Kani

  • How to write validation in java sript item should not allow more than 20 ch

    HI,
    I need to write validation in java script for a item it should not allow more than 20 characters.
    Thanks
    Nr

    If this answers your question, please mark your question as answered (so everyone knows it is answered) and assign points where you see fit..
    Thank you,
    Tony Miller
    Webster, TX

  • HOW TO CHECK THE CHECKBOX VALUE WITH SQLCE DATABASE

    Hai All,
       Good Day! I am using VB in Visual Studio 2008. I have a form with check boxes and one button control. If i selected the check box and then click the button, check the database table field and check box text are equal. if both are equal then
    how to check?
     I have tried it. The code is:
    Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim conn As New SqlCeConnection
    Dim cmd As New SqlCeCommand
    conn.ConnectionString = "DataSource = E:\Vbprojectex\WindowsApplication3\WindowsApplication3\Database1.sdf"
    Try
    cmd.Connection = conn
    conn.Open()
    If CheckBox1.CheckState = 1 Then
    cmd.CommandText = "SELECT Aerator FROM ttabpagelist where Aerator = CheckBox1.Text"
    TextBox1.Text = 1
    End If
    cmd.ExecuteNonQuery()
    Finally
    conn.Close()
    End Try
    End Sub
    End Class
    Thanks & Regards Sasi ................. Go Green

    probably something like (ofc below will never give result since Aerator can't have 2 values, you will have to adjust the second check box column obviously)
    Try
    cmd.Connection = conn
    conn.Open()
    dim strsql as string = "= "SELECT Aerator FROM ttabpagelist "
    Dim whereConcatenator As String = " WHERE "
    Dim Wherestatement As String = String.Empty
    If checkbox1.checked = True Then
    Wherestatement += whereConcatenator
    Wherestatement += "Aerator = " & checkbox1.Text
    whereConcatenator = " AND "
    End If
    If checkbox2.checked = True Then
    Wherestatement += whereConcatenator
    Wherestatement += "Aerator = " & checkbox2.Text
    End If
    cmd.commandtext = strsql & wherestatement
    TextBox1.Text = 1
    End If
    cmd.ExecuteNonQuery()
    Finally
    conn.Close()
    End Try

  • How to write to Excel values from following measurements to neighbour cells?

    Hi,
    I build app for some measurements, "end" of this app:
    As you see I have few arrays (with 12 rows). I want to eksport 2 arrays to Excel. In upper case results looks like this:
    And everything is OK, this I want, but... When I run app next time I want to save this next results in columns C and D in the same file. Next app run - columns E and F, etc. How can I do this?
    Regarsds

    Express VIs (such as Write to Measurement Files) are basically "shortcuts" designed to provide a quick fix, but rarely allow much flexibility, such as allowing you to determine where to put your data on subsequent writes.
    What you are trying to do can be done with the Report Generation Toolkit, which includes components that directly link to Excel (I'm not sure if Write to Measurement File actually uses Excel or simply writes data in an Excel-compatible format).
    However, there's a minor complication.  The task you have stated is to write columns, with subsequent columns going to the right of existing columns.  There's a function in the Excel-specific sub-Palette to find the last row, which you can use to write rows, with subsequent rows going below the last row.  It's not too difficult to use the functions in the Report Generation Toolkit to basically do what you want, but it isn't exactly straight-forward.  It would be a lot easier if you could write your data in rows ...
    BS

Maybe you are looking for