Current Position:Home > How do  we check the check box items based on the databse fields.

How do  we check the check box items based on the databse fields.

Update:10-11Source: network consolidation
Hi All,
I have a requirement like as mentioned below#
1. I have a combox box whcih i will be populated from database.
2. I have created two check box as "Stategric " and "Non Stategric".
3. Now when i select the combox box condition i need to select the check box items.
4. But the problem is i wil be knowing weather it is a stategric or Non stategirc based on the database column.
5. How do i need to map the database point of view and correlacte with javascript pont of view.
6. Do we need to write any Application process to achieve this task and who we can do that.

The Best Answer

Hi VC,
As per my understanding the code should be placed between --.
Based on this i have placed the code
function setCheckbox(pThis, pItem){
    var l_code = '';
    // Get checkbox name
    rName = document.getElementsById('P1_ENG_BAU');
alert("The value is"+rName);
    // Fire AJAX
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=CHECKBOX_LIST',0);
    gReturn = get.get('XML');
    if (gReturn) {
      var values = gReturn.getElementsByTagName('value');
      var messages = gReturn.getElementsByTagName('message');
      // Build the checkbox
      for (i=0; i<values.length; i++) {
        var rValue = values.firstChild.nodeValue;
var rMessage = messages[i].firstChild.nodeValue;
l_code+='<input id='+P1_ENG_BAU+'_'+i+' type=checkbox value='+rValue+' name='+rName+'>';
l_code+='<label for='+P1_ENG_BAU+'_'+i+'>'+rMessage+'</label>
document.getElementsById('P1_ENG_BAU').innerHTML = l_code;
Correct me if iam understanding is wrong.
Edited by: Anoo on May 31, 2012 11:04 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
  • How do  we check the check box items based on the databse fields. Update:10-11

    Hi All, I have a requirement like as mentioned below# 1. I have a combox box whcih i will be populated from database. 2. I have created two check box as "Stategric " and "Non Stategric". 3. Now when i select the combox box condition i

  • Preventing disabling of check box - item okay in MIGO Update:10-11

    Dear all, In the MIGO transaction - during goods receipt for subcontractor material, when the item (incoming) is checked as item okay - automatically the child material (Material sent to subcontractor) is also activated thereby to enable 543 movement

  • Check box Item property in mutiple record block Update:10-11

    Hi, I have migrated a number of forms from 6i to 10g. All seems to be working apart from a problem with the display of check boxes that are part of a multiple record block. The item property for the checkbox has font weight set to bold and this works

  • Check Box item in oracle forms Update:10-11

    Hello experts,               I am new in oracle forms. I am using oracle forms 11g,weblogic server 10.3.5,oracle database 11g at windows 7 platform. I have a simple data block from base table.there is a tabular form is selected, It has four rows(reco

  • Single or multiple check box values displayed in a text field Update:10-11

    My apologies, this may be a duplicate discussion. I'm using the following script to display the values of check boxes in a text field.  I would like the word "and" to separate the values if two check boxes are selected. If more than two boxes ar

  • Check box to copy text from 1 field to another Update:10-11

    I am trying to use a check box to copy the tech from a billing address text box to a shipping address text box only if the check box is checked. I am new to using java and building forms in acrobat so please understand. I have googled and tried to im

  • How to create a group/list of check box variables for display in text field, in appended format Update:10-11

    I need to identify a series of single-response checkbox variables and display the ones selected (as a group) in a text field in an appended (comma, space) format. Last week, you provided a great little script for a similar need using List Box (multip