Casting data Subset to CDT type

Hi everyone,

I have an interesting issue that is happening just wondering if anyone has ran into that issue before.  I have a query rule in which i am getting back a subset of data.  When casting that data subset to the cdt type for example, using cast(typeof('type!CDTNAME')  expressionRuleWithQueryEntity() ), if the data subset has multiple dictionaries, only one is returned when the cast is applied.  Any thoughts on this?

Regards,
Jerry

  Discussion posts and replies are publicly visible

Parents
  • Hi Jerry,

    Update the casting to
    cast(typeof({'type!CDTNAME'()}), index(expressionRuleWithQueryEntity(),"data",{})) this way you will be casting the output of the query entity to list of data instead of single datasubset.Using {} near the CDTame makes the whole difference and if you are using a query rule then your casting should be something like this : cast(typeof({'type!CDTNAME'()}), expressionRuleWithQueryEntity()).

    Thanks,
    Abhishek gaddam

Reply
  • Hi Jerry,

    Update the casting to
    cast(typeof({'type!CDTNAME'()}), index(expressionRuleWithQueryEntity(),"data",{})) this way you will be casting the output of the query entity to list of data instead of single datasubset.Using {} near the CDTame makes the whole difference and if you are using a query rule then your casting should be something like this : cast(typeof({'type!CDTNAME'()}), expressionRuleWithQueryEntity()).

    Thanks,
    Abhishek gaddam

Children