Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
10 replies
Subscribers
7 subscribers
Views
6778 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I have a functional query rule that returns the datasubset I am interested in. W
davidj578
over 9 years ago
I have a functional query rule that returns the datasubset I am interested in. With the data from that data subset I would like to populate a CDT. Is there a way to convert the data section of a datasubset into a CDT? The syntax I am trying to use:
a!save(ri!CDT_dataWeNeed,fn!index(rule!Database_getData(),"data",""))
The reason I am trying to do this is because I would like to use dot notation to move data from a database with datastore to nested CDTs to create an XML message.
OriginalPostID-164186
OriginalPostID-164186
Discussion posts and replies are publicly visible
Parents
0
sikhivahans
over 9 years ago
@philb I guess we can eliminate looping in case of arrays being returned by rule by changing the way we type cast:
cast(
typeof(
{'type!CDT_YouNeed'()}
),
fn!index(rule!Database_getData(),"data",""))
I tried this approach many times in case of a multiple cdts being returned from datasubset and it worked absolutely fine. Further I also used the same approach to flatten the data sets that were returned from multiple queries.
To the best of my knowledge, it depends on how we type cast the data, i.e. if it is single, use 'type!CDT_YouNeed'(), and if it is multiple, use {'type!CDT_YouNeed'()}. Please do let me know I missing something.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
sikhivahans
over 9 years ago
@philb I guess we can eliminate looping in case of arrays being returned by rule by changing the way we type cast:
cast(
typeof(
{'type!CDT_YouNeed'()}
),
fn!index(rule!Database_getData(),"data",""))
I tried this approach many times in case of a multiple cdts being returned from datasubset and it worked absolutely fine. Further I also used the same approach to flatten the data sets that were returned from multiple queries.
To the best of my knowledge, it depends on how we type cast the data, i.e. if it is single, use 'type!CDT_YouNeed'(), and if it is multiple, use {'type!CDT_YouNeed'()}. Please do let me know I missing something.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data