Skip to Content
0

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

Sep 22, 2017 at 05:07 PM

52

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Joseph BERTHE Sep 25, 2017 at 05:43 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Irfan Gokak Sep 25, 2017 at 09:38 AM
0

Hi Kaustubha,

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

Share
10 |10000 characters needed characters left characters exceeded
Arjun Biswas Sep 25, 2017 at 10:44 AM
0

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,

Share
10 |10000 characters needed characters left characters exceeded