how to cast the Stored procedure response to CDT?

Certified Senior Developer

Hi,

we have requirement like we are calling one SP to get some data from DB. now we need to cast that SP response to one of the CDT. 

we tried by casting some thing like

if(
local!SPResponse.success,
cast(
typeof(
{
'type!{urn:com:appian:types}<CDT Name>'()
}
),
local!SPResponse.result
),
{}
)

we are getting the results with target CDT having all the value are null. do we need to write any looping to assign individual elements or OOB casting will do for the same. 

Please let us know if we are missing any thing for the same. if you can provide some sample it will be more help ful :)

Thanks in Advance.

  Discussion posts and replies are publicly visible