Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

northerner
New Contributor III

QRS API: orderby using child property (e.g. stream name)

Hi,

I'm using the QRS API to get a list of apps.  I can sort the list by app name using orderby=name in the query string. I want to be able to be able to sort the list by stream name but I can't figure out how to do this.  Does anyone know if it's possible to apply a sort that uses a child property such as stream.name or stream.id?

Thanks

Tags (2)
1 Reply
Employee
Employee

Re: QRS API: orderby using child property (e.g. stream name)

Hey Damian,

So it looks like there is a bug on the Repository side whereby standard orderby-ing will not work when the order condition has empty values.

Example Working: /qrs/app/full?orderby=stream.name&filter=(name eq 'zzz')

Example failure condition: /qrs/app/full?orderby=stream.name

So it looks like there is a bug on the Repository side whereby standard orderby-ing will not work when the order condition has empty values.


In lieu of that (while it's getting resolved), you can use

POST /qrs/app/table?orderAscending=true&sortColumn=stream.name

Body:

{

    "entity": "App",

    "columns": [

        {

            "name": "id",

            "columnType": "Property",

            "definition": "id"

        },

        {

            "name": "name",

            "columnType": "Property",

            "definition": "name"

        },

        {

            "name": "owner",

            "columnType": "Property",

            "definition": "owner"

        },

        {

            "name": "publishTime",

            "columnType": "Property",

            "definition": "publishTime"

        },

                {

            "name": "stream",

            "columnType": "Property",

            "definition": "stream"

        }

    ]

}

Hope that helps.