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
1964 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
140244 - no subject - It seems I can't expose the certain data
robbier
over 9 years ago
It seems I can't expose the certain data in a portal report and I'm not sure if it is me or not. So I have an existing tasks portal report which works just fine. I've added a new column to this report and am trying to expose is the some additional data which is buried inside a process variable. This process variable is a CDT. In this report I access other columns of this CDT and no problem. For example in the Data tab of other working columns I do the following:
index(pv!MyCDT,"Field1",-1)
..and the report spits out the data for Field1 with no problems. The wrinkle in my new column seems to be that this particular column I am now trying to expose is a CDT array, that is: MyCDT.CDTFieldList.FieldA, where CDTFieldList is a CDT as an array and FieldA is a single-valued boolean. A little gnarly but not unheard of. Ultimately I want need to check to see if any values of the FieldA are true but I can't even get that far. When I attempt to set up an expression i...
OriginalPostID-140244
Discussion posts and replies are publicly visible
0
robbier
over 9 years ago
...n the Data field like this:
count(index(pv!MyCDT,"CDTFieldList",-1))
--remembering that CDTFieldList is a CDT array
I get a value of 1 in every case (which I know not to be true). When I embed a similar expression (as above) into a debug section on the task form and open that form I get a true count back.
Really my question is whether or not I can get to the data I need from a portal report? If so then what might I be doing wrong here?
Hope my explanation makes sense.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
Rob - if you run count() against an empty CDT, you'll get a result of one. Try using rule!APN_isEmpty() from the common objects if you have them available.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Lakshmi Meyyappan
over 9 years ago
If I understand correctly, you don't need the count of how many are true, you only need to know if any of the FieldA values are true? I would suggest you use the or() function. It would look something like this: or(index(index(pv!MyCDT, "CDTFieldList", false), "FieldA", false))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
robbier
over 9 years ago
Thanks to both for your responses. So I was thinking that and trying but thought I was getting tripped up over the syntax.
Anyhow, tried using or(index(index(pv!MyCDT, "CDTFieldList", false), "FieldA", false)) in this case and got a similar result of "false" when I know (and can see manually in the process data) that there are a bunch of true values.
It really seems to me the portal report is not able to "dig" into an embedded array within a process variable--at least not a CDT-based array.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Lakshmi Meyyappan
over 9 years ago
That's an interesting problem. Have you tried displaying the list of "FieldA" values in the report? You may be able to find the limitations by trying to display the whole CDTFieldList, then display a single field of the CDTFieldList, then display the whole CDTFieldList.FieldA, then one value (such as the first value) of CDTFieldList.FieldA. This isn't a solution to the problem, but an approach like this might help in debugging exactly how far the portal report is able to "dig" in.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jackm829
A Score Level 3
over 9 years ago
Similar to the above, what happens when you try: tostring(index(index(MyCDT,"CDTFieldList",null),"FieldA",-1))
or when you try:
tostring(index(MyCDT,"CDTFieldList",null))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
robbier
over 9 years ago
..not what I was hoping for...
I did try your second suggestion-- tostring(index(MyCDT,"CDTFieldList",null))
All of the data in that column in null. I had attempted a similar expression earlier except using count(index(MyCDT,"CDTFieldList",null)) and got the same results..blank.
It really seems to me the portal report can't into a 2nd-level array. What I've done is actually go into the process model and use an expression to bubble up my "FieldA" into its own process variable. I then expose that in the report. Was hoping to keep these things separate but this seems the only way I can do it for the time being.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel