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
7 replies
Subscribers
4 subscribers
Views
1994 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
162859 - no subject - Hi,\n\nI'm trying to create a report so
paulr866
over 9 years ago
Hi,
I'm trying to create a report so that I have the ability to select a business process (from a selectable grid) with all the related columns and export this into an excel document. However although I have the export functionality working the select functionality doesn't seem to be working and instead the entire data set is being passed over.
Can someone please advise? I have attached what I have done so far
Thanks
Paul
OriginalPostID-162859
selection grid config
Discussion posts and replies are publicly visible
0
sikhivahans
over 9 years ago
@paulr Hi, that is happening because the entire datasubset is being saved into local!exportToExcel under 'Export to excel' button.
So before saving the local!datasubset into local!exportToExcel, filter the local!datasubset by making use of local!selectedProcessIds which thereby saves only selected records of datasubset into local!exportToExcel.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
paulr866
over 9 years ago
Hi Sikhivahans,
Thanks for getting back to me so soon. I'm pretty new to Appian do you have any examples of how I would do this?
Thanks
Paul
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
Try something like the below. replace "processIds" with whatever element contains your process IDs.
index(
local!datasubset.data,
wherecontains(
index(local!datasubset.data,"processIds",{}),
local!selectedProcessIds
),
{}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
paulr866
over 9 years ago
Hi Phil Thanks for the response I kind of get what you mean could you elaborate a bit more please? Also would an Apply function need to be added to keep the rule looping?
Thanks
Paul
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
You shouldn't need an apply; what that code above does is get the indexes where the selected process ids are present in the cdt element that contains the process ids, and then uses those indexes to extract and return the "rows" in the cdt that are those that were selected. Does that make sense?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
paulr866
over 9 years ago
It makes perfect sense thanks. However I'm getting the following error
Expression evaluation error at function 'wherecontains' [line 305]: Invalid types, can only act on data of the same type (Any Type, Text) Any ideas?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@paulr That's correct because wherecontains() can act only on same data types. Perform explicit type casting using cast() function. For example, let's say you are searching for a set of integer values (whose data type is 'Any Type') in an integer array. Then you should use wherecontains as follows:
wherecontains(tointeger(
),
).
To the best of my knowledge, we should always be aware of the data types of the data that we pass as inputs to a function and should be explicitly type casting them (when Appian doesn't perform a implicit type casting) on need basis.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel