I have seen the example of dependent comboxes. I can not make it to work though if the dependent comboboxes are within the same row on a grid. This is my code

XML

 <column headerLabel="MATERIAL">
        <comboBox name="materialtypecombo" displayColumn="NAME" valueColumn="MATERIALID" column="MATERIALID" listDataSource="MATERIAL1">
        <events>
            <valueChanged action="populateMaterialDetail"></valueChanged>
          </events>
         </comboBox>   
      </column>
      <column headerLabel="MATERIAL DETAIL">
          <comboBox name="materialdetcombo" displayColumn="MATDTNAME" valueColumn="MATERIALDETAILID" column="MATERIALDETAILID" listDataSource="MATERIALDETAIL1"/>
      </column>

Procedure

PROCEDURE populateMaterialDetail IS

component_NM varchar2(100);

BEGIN api_component.setValue('PRESTIMATIONWASTE.materialdetcombo','');

api_datasource.setBindvar('MATERIALDETAIL1.MATERIALID', api_component.getValueNR('PRESTIMATIONWASTE.materialtypecombo'));

api_datasource.executeQuery('MATERIALDETAIL1');

END;

asked 13 Feb '14, 05:59

chris2014's gravatar image

chris2014
115
accept rate: 0%


I found the issue

The following command was not working to get the MaterialID api_component.getValueNR('PRESTIMATIONWASTE.materialtypecombo')

Instead I used v_mat_id:=API_DATASOURCE.GETCOLUMNVALUENR('PRESTIMATIONWASTE1.MATERIALID'); in order to bind it.

link

answered 13 Feb '14, 07:48

chris2014's gravatar image

chris2014
115
accept rate: 0%

When I commit the datasource, and come back later it brings for all the rows the materialdetailid for COLUMN MATERIAL DETAIL and not the MATDTNAME which is the descirption. How can i show the MATDTNAME instead. It seems that the MatDTName comes only when the value of the Material column is changed.

link

answered 13 Feb '14, 09:34

chris2014's gravatar image

chris2014
115
accept rate: 0%

Each combobox has a valueColumn and a displayColumn attribute. That's how you specify what the combobox should store and display.

(14 Feb '14, 01:39) Yalim ♦♦

Also when I change the Material for one row it changes the Material Detail for all the rows that relates to the last material that i have chosen.

This is a very important functionality because we use it a lot. How can i make this work correctly.

link

answered 13 Feb '14, 10:02

chris2014's gravatar image

chris2014
115
accept rate: 0%

Hi Christos, please see my answer in your other post: http://osqa.theformspider.com/questions/2503/dependent-comboboxes-within-a-grid

link

answered 14 Feb '14, 01:37

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 22%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×30

Asked: 13 Feb '14, 05:59

Seen: 1,206 times

Last updated: 14 Feb '14, 01:39


© Copyright Gerger 2017