Realm slice not working

Realm slice is not working for the second time.
My query is:
realm.objects(‘article’).sorted(‘createdAt’,true).slice(0, 30)

For the first time it is working but for the second time the query is not working. And I can see there are 1500 records.

Thanks in advance

Hi @shawn_batra, could you share a bit more info on what you mean by working the first time but not the second – is the slice (0, 30) for both?

What error do you see?

Which SDK is this using?

Thanks for reply. No for the next time it was .slice(30, 30) which is clear now as it requires the end index not the length.
So issue is solved thanks.

Great to hear you found the solution! Please come back the next time you need a rubber duck :slight_smile: :duck:

Can you provide some help in this : https://www.mongodb.com/community/forums/t/best-practice-to-handle-multiple-realm/105821/4/