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
2 replies
Subscribers
9 subscribers
Views
1274 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I installed the getdatasubsetdownloadlinkfromrule, and exporting my report to Ex
mjmallet
over 9 years ago
I installed the getdatasubsetdownloadlinkfromrule, and exporting my report to Excel.
In my rule I have a field name (ex:LEAD_CONTACT) that comes out as a username when I export to Excel. How do I apply the user function to fetch the full name within this rule?
= with(
'type!{urn:appian:plugin:datasubsetdownload:types}ExportableDataSubset'(
filename: "Exported Data",
fieldNames: {
"LEAD_CONTACT"
etc....
OriginalPostID-202498
OriginalPostID-202498
Discussion posts and replies are publicly visible
0
sikhivahans
over 9 years ago
@mjmallet To the best of my knowledge, one of the (can be the only as well) preferred ways to do so would be to hold the formatted data in the datasubset attribute.
Let's say you do have a rule that returns 'Products' data but you want the formatted values for some of the fields in it. Then you may do something as follows:
with(
\tlocal!actualProducts: rule!getAllProducts(),
\t/* Assume that the actual data contains product type id, but we want to derive product type name */
\tlocal!formattedProducts: apply(
\ ttype!myFormattedProduct(
\ tid:_,
\ tname:_,
\ tproductTypeName:
\ t),
\ tmerge(
\ tlocal!actualProducts.id,
\ tlocal!actualProducts.name,
\ tapply(rule!getProductNamesFromProductTypeIds(_),local!actualProducts.productTypeId)
\ t)
\t),
\t/* where type!myFormattedProduct() is a CDT(formatted CDT) created for storing the formatted data */
\ttype!ExportableDataSubset(
\t datasubset: todatasubset(local!formattedProducts,topaginginfo(startIndex: 1, batchSize: -1)),
\t fieldNames: {"id", "productTypeName"},
\t fieldLabels: {"ID", "Product Name"},
\t filename: "Products"
\t)
)
In order to format the data, you may opt for alternate ways such as creating a view and querying the same or may try to create a join temporarily using 'joinCdt' in 'CDT Manipulation' plugin. But the basic idea is to build the data in the datasubset of 'ExportableDataSubset' in such a way that it holds formatted data and thereafter you can start using fields in it as 'fieldNames'.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mjmallet
over 9 years ago
ok thanks it makes sense, will try it out. :)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel