Skip to Content
avatar image
Former Member

Transfer of items from ItemListBox to Table

Hi All,

I am developing a Purchase Request form.

I am fetching Material Number and Material Desc in an ItemListBox. In the form, there is an DropDownBox for Quantity.

The user can select an item (Material Desc eg. Computer Notebook) and also select the Quantity. There is a Table in the form, in which the User can add Material and Qty.

Now the task for me is to transfer the selected Item and Qty from ItemListBox to Table. Also, whenever a selected item is transferred to Table that item should be removed from the ItemListBox.

I do need some inputs.

Please help.

Regards

Nikhil Bansal

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 05, 2007 at 02:30 PM

    Hi Nikhil,

    Add this code to your onButtonAction

    IPrivateTestingPurposeProjectCompView.ITablesourceElement tableElement = wdContext.nodeTablesource().createTablesourceElement();

    tableElement.setTableDescriptiveText(wdContext.currentItemListBoxSourceElement().getItemListBoxDescriptiveText());

    tableElement.setTabletext(wdContext.currentItemListBoxSourceElement().getItemListBoxText());

    wdContext.nodeTablesource().addElement(tableElement);

    <b>XXXXXXXXXXXXXXXXXXXXX</b>

    Regards

    Sid

    Message was edited by:

    Armin Reichert

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 06, 2007 at 07:16 AM

    Hi Nikhil,

    For fetching the record, I believe you will be using some push button. This push button will be in the view. In the implementation tab of view, you can add following code

    wdContext.currentContextElement().setOutput(wdContext.currentContextElement().getInput());

    wdContext.currentContextElement().setInput("");

    This is based on the assumption that you have stored you have initally stored the data in input. After pushing the button, data of input will be transferred to Output. At the same time, above code will set the input as null.

    Regards,

    Gaurav

    Add comment
    10|10000 characters needed characters exceeded