Skip to Content
avatar image
Former Member

how to check if data model is empty?

I have an SAPUI5 app and I'm getting the data from the back-end using an OData model. I I get the OData model, convert it to a JSON model and then bind it to the xml view. I pass in an input to the back end when I make the call and get the data I'm requesting based on that input. If there is no data corresponding to that input, nothing is returned. How can I check the oData or JSON model if there is no data being returned? I would like to perform a check before I try to bind it to the view.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 09, 2017 at 07:56 PM

    just put a break point in your success function of the ajax call.

    check what is returned there, you may also have to check with the backend developer what they designed to return.

    Add comment
    10|10000 characters needed characters exceeded