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
5 subscribers
Views
2999 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
64480 - no subject - I have two arrays in process model conta
ambrishs
over 11 years ago
I have two arrays in process model containing FirstName and LastName in it. I am reporting on this process model. I want to display Name(FirstName LastName) as single column on report. I am trying to use doForEach to achieve so, but it doesnt appear to be working on report. Any help/suggestion? Thanks....
OriginalPostID-64480
Discussion posts and replies are publicly visible
Parents
0
Rick Bivin
Appian Employee
over 11 years ago
Hi, Ambrish. If you have the opportunity to refine your process, we would definitely recommend either storing the concatenated values in process or use a multi-valued User process variable to store users. Appian is quite good at displaying multiple users in a single cell value of a report.
I was able to create a recursive expression rule that takes your arrays as input and builds a string. Once the length of the arrays is exceeded, it returns the names. This method could have a big impact on report performance, so make sure you test for any performance implications. This is definitely not a best practice.
In my example, the rule has inputs for the first names, last names, a count, and the returnString.
if(ri!count > length(ri!firstNameArray), mid(ri!returnString, 4, len(ri!returnString) - 5), rule!returnNames(ri!firstNameArray, ri!lastNameArray, ri!count + 1, ri!returnString & index(ri!firstNameArray, ri!count, "") & " " & index(ri!lastNameArray, ri!count, "") & ", "))
The report column definition would be: rule!returnNames(pv!firstNameArray, pv!lastNameArray, 0, "").
The mid() function removes any leading/trailing comma's from the list of names.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Rick Bivin
Appian Employee
over 11 years ago
Hi, Ambrish. If you have the opportunity to refine your process, we would definitely recommend either storing the concatenated values in process or use a multi-valued User process variable to store users. Appian is quite good at displaying multiple users in a single cell value of a report.
I was able to create a recursive expression rule that takes your arrays as input and builds a string. Once the length of the arrays is exceeded, it returns the names. This method could have a big impact on report performance, so make sure you test for any performance implications. This is definitely not a best practice.
In my example, the rule has inputs for the first names, last names, a count, and the returnString.
if(ri!count > length(ri!firstNameArray), mid(ri!returnString, 4, len(ri!returnString) - 5), rule!returnNames(ri!firstNameArray, ri!lastNameArray, ri!count + 1, ri!returnString & index(ri!firstNameArray, ri!count, "") & " " & index(ri!lastNameArray, ri!count, "") & ", "))
The report column definition would be: rule!returnNames(pv!firstNameArray, pv!lastNameArray, 0, "").
The mid() function removes any leading/trailing comma's from the list of names.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data