Query rule substitute

Hi, 

As you know Query Rule has been deprecated in newer versions of Appian. I need a function that will mimic the exact behaviour of Query rule including the return type. 

I have tried using queryEntity() but the return type is not the same as query rule so i am facing a lot of issues. 

Please help! 

TIA 

  Discussion posts and replies are publicly visible

Parents
  • The default output format of a queryentity is a datasubset, in order to get the data in the same format of a query rule, you can try to slice the data part of the query entity result. 
    You can either use the index function like index(local!output,"data",null) or just local!output.data. This would give you a dictionary type object. You can directly use in a CDT type rule input.
    As mentioned below by you can use cast on top of the result set if you need to convert the output to a specific cdt.

    Also query rules used to return all the columns whereas queryentity only returns specific columns, this can be achieved by not passing any query selection parameter to the queryentity.

Reply
  • The default output format of a queryentity is a datasubset, in order to get the data in the same format of a query rule, you can try to slice the data part of the query entity result. 
    You can either use the index function like index(local!output,"data",null) or just local!output.data. This would give you a dictionary type object. You can directly use in a CDT type rule input.
    As mentioned below by you can use cast on top of the result set if you need to convert the output to a specific cdt.

    Also query rules used to return all the columns whereas queryentity only returns specific columns, this can be achieved by not passing any query selection parameter to the queryentity.

Children
No Data