Skip to Content
avatar image
Former Member

How do I add data to another table by creating a new column which doesn't exist?

I have captured the data based on the event(selectionChange).

For Ex:

var oIndex = oEvent.getSource().getSelectedItem().getBindingContext("myTestModel").getPath();

var oPath = oIndex + "/Components";

How can i add the data present in oPath to another table by creating a new column.As of now the second table has only three columns . I want to create the fourth column and add the above captured data.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 25, 2017 at 05:43 AM

    Hello,

    If your OData doesn't have 4 columns then you should use JSon Model.

    When you call the OData read method, then catch the event Success to retreive the response as JSon, then build a JSON model and add your fourth column. Then bind the JSon model to the table.

    Regards,

    Joseph

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 25, 2017 at 09:38 AM

    Hi Kaustubha,

    Your 4th column is fixed or it should be dynamic? And you always want to create only one column ie. 4th one?

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 25, 2017 at 10:44 AM

    You can use formatter functions if in case you are getting data from the back end. Go through this link :

    https://openui5beta.hana.ondemand.com/1.32.0/docs/guide/0f8626ed7b7542ffaa44601828db20de.html

    Regards,

    Add comment
    10|10000 characters needed characters exceeded