on 12-27-2018 12:37 PM
I am running odata service in a loop, sometimes services are not getting triggered properly but most of the times it works properly and gives the expected result. Can anyone please make me understand the reason for this?
Dear Pandian,
Can you please give more detail by "calling services in a loop" in example code block.
On which purpose are you calling oData in a loop for example is it for listing the result on the table?
Kind regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As shown in the pic i am looping every category(ex:Deliveries) and calling odata service to fill data accordingly. As you see data is coming properly for all categories, but sometimes application not loading properly and i couldn't see any data. is it related to performance? Please suggest.
Dear Pandian,
It seems that this issue pops time by time because of the nature of javascript asynchronous working style. I suggest you to not call oData service in loop just call once and then loop in your data set or just bind your result to view object. When you call some service in loop javascript not wait for previous call results and if your service result delayed it can be cause problems. If you supply your loop code block and additionally error log in your console our answers will be more helpful for you.
Kind regards.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.