cancel
Showing results for 
Search instead for 
Did you mean: 

Working with Object Tables in SAP Mobile Development Kit

Will3
Explorer
0 Kudos

Hi All!
I am having trouble understanding, and gaining access to the values within object tables. My current project uses a 'checklist' which uses the object table as its main component, and each 'item' in the checklist has a boolean field in its ODATA called 'isMandatory'.
Ultimately, I need to be able to submit this checklist using a submit button at the bottom of the page, ONLY IF all items that are Mandatory have been populated. I just have no idea how to access those values...

I have attached a text file with the page structure taken. Currently, the 'isMandatory' value is being held in the statusText field.

Any help would be greatly appreciated!

View Entire Topic
bill_froelich
Product and Topic Expert
Product and Topic Expert

I don't see the StatusText in the Object Table as being set.  However the Object Table is a display control.  There is no way to access it's content (plus it pages data in so there is no guarantee all the data is loaded in the control yet).  If you need to validate that all items with isMandatory are populated correctly you can use a rule and perform a clientAPI.read to target the same entity set as the Object Table and include isMandatory eq true in the filter criteria.  Then loop over the results to confirm the necessary fields are populated before proceeding with the submission process.

Will3
Explorer
0 Kudos
Thank you! I don't have much experience looping through object tables, to be honest I don't even know how to 'view' the structures in the MDK debugger in order to script a loop. Are there any tools/blogs or simple script/rule examples of what an object-table looping script might look like?