Query Entity Issue

I have a Query Entity rule which accepts input as appId of multiple type, from my SAIL UI I am calling this rule with appIds for example {1;2;3;4}, but query entity is not returning result in same order rather it is returning CDT in Random fashion as given below:

Actual Result - [Id =3, name="Tom"];[Id=4, name="Dan"];[Id=1, name="John"];[Id=2, name="David"]
Expected Result - [Id=1, name="John"];[Id=2, name="David"];[Id =3, name="Tom"];[Id=4, name="Dan"]
appIds are passed in sequence {1;2;3;4}

This issue is creating data mismatch on UI.
Is there a way to handle this?
Thanks in Advance

OriginalPostID-251314

  Discussion posts and replies are publicly visible

Parents
  • @prakharg
    Hi ,
    There is one way of doing it ,
    You can sort the field which maps the "id" (appId in your case) in a!sortInfo() and mark ascending as true , so that you get the data in sequence {1,2,3,4} only , but this might not work for cases where you pass the appIds as {3,4,2,1} and expect the result to come in the same sequence

    Something like this might work
    =====

    a!pagingInfo(
    startIndex : ,
    batchSize : ,
    sort : a!sortInfo (
    field : "appId",
    ascending : true
    )

    =====
Reply
  • @prakharg
    Hi ,
    There is one way of doing it ,
    You can sort the field which maps the "id" (appId in your case) in a!sortInfo() and mark ascending as true , so that you get the data in sequence {1,2,3,4} only , but this might not work for cases where you pass the appIds as {3,4,2,1} and expect the result to come in the same sequence

    Something like this might work
    =====

    a!pagingInfo(
    startIndex : ,
    batchSize : ,
    sort : a!sortInfo (
    field : "appId",
    ascending : true
    )

    =====
Children
No Data