cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP MDK: How to R/W values from/to editable DataTable cells?

selectfrom
Explorer
0 Likes
769

Hello!

How do I read values in a Rule from an editable DataTableColumnItem ("EditType": "List") in a DataTable OnValueChange and write them to another cell on the same row? The Table is populated via an OData-Service-Binding and the options for the column in question are either an "Object Collection" or an "Object Binding on EntitySet".

The Mentor-App has such an example but I can't find the source code for that.

@bill_froelich @Jitendra_Kansal78 

Accepted Solutions (0)

Answers (1)

Answers (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert

Can you please provide more details on where / what you see in the Mentor App?

You can access the changes using the getChanges API method.  You may want to review the What's New blog when we introduced the feature in MDK 23.3

selectfrom
Explorer
0 Likes

Thank you for answering so quickly.
Unfortunately, we are not able to retrieve changes using:

 

clientAPI.getControl('SectionedTable0').getSection('SectionDataTable0').getChanges();

// or:

clientAPI.getPageProxy().getControl('SectionedTable0').getSection('SectionDataTable0').getChanges();

 

Depending on whether we use getPageProxy() or not we either get an empty array or an empty object.
And the Mentor app example I was referring to is the Mentor demo app of the client app. In there, the data table showcase has our desired functionality.

selectfrom
Explorer
0 Likes

We want to implement the functionality to set values in the table at runtime, retrieve them, do calculations and set the results as values in other fields of the table, kind of like a spreadsheet calculation, just with ListPickers instead of Text fields.

selectfrom
Explorer
0 Likes
@bill_froelich Can you help me, please?
selectfrom
Explorer
0 Likes
Unfortunately, .getChanges() returns an empty array