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

orderBy added to dataQueryBuilder. is not working in iOS but it works perfectly in android

Girish_KR
Participant
0 Likes
540

Hi,

I am facing an issue with orderby clause in dataQueryBuilder. I have added a rule to set queryoptions for a object table. Added rule code for reference.
Though the same code works perfectly in android application, it is giving 400 error in iOS application. In iOS application it works only after removing the orderby clause.

I am currently using SAP MDK version MDK_SDK_24_7_2_001_Universal.

Regards, 

Girish

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Likes

Your rule appears to be adding the same order by twice.  Also, the else portion still references the search string while will be undefined which looks to me to be incorrect since if you have no search string you shouldn't try to use it in the filter portion.

Is it the case with no search string that isn't working on iOS or when you are trying to search it doesn't work?

Girish_KR
Participant
0 Likes

Hi Bill,
I have been able to resolve the issue by adding orderBy('createdAt%20desc') in place of orderBy('createdAt desc').  

Regarding the attached code I tried to copy paste the logic from the actual rule, missed few things in it.

Answers (0)