Hoping for a little guidance / sign posting before I lose the will to live... I have spent the whole day trying to figure out how to get one item of data into my custom excel doc and have to put my hands up in defeat - I've been through the University and online documentation an cannot find a solution that works. I have used custom Excel docs for years and get them to work without any issues but this one has me stumped...
I have a nested repeatable section:
Using %a[FieldName] etc I can get the names of the rooms listed separately on my excel sheet. Next to that I want to have the number of paintings within that room. This number is recorded in the footer collected via the aggregate function.
When I use %a[Paintings] or %a[Paintings] the output is the data for all rooms:
I am trying to single out each number but having no joy.
Is it because the field is calculated in the footer or am I missing something else?
Appreciate any help/guidance.
Hi Stephen, I'll look into this and someone will get back to you. Sounds very frustrating! Please find a way to hold on to your will to live ;)
------------------------------Natalie TallonProduct ManagerProntoFormsntallon@prontoforms.com------------------------------
------------------------------Stephen MorrisonBusiness Information and Performance DirectorBCA Insulation------------------------------
Figured this would be an easy answer but boy was I wrong. It seems like when you look at footer questions, DREL is not returning the selected index - it will always return the full array.
%a[Paintings] or %e[Rooms][%a[Paintings]] returns
It should return 15, but apparently not. I did confirm it returns an actual array by adding a delimiter
%a[Paintings][, ] returns:
So it's not just returning a string.
After a ton of experimentation I was able to get an array that is accessible by index.
I found that each CHILD section contains the footer question data for the parent section it belongs to - and that can be accessed by index.
This will return
The [Rooms] index is the one you need to change to get values for each room.
%e[Rooms][%e[Walls][%a[Paintings]]] will return:
Paintings must have an index but it doesn't matter what index you give it. The walls index can be anything up to the number of Walls in that Room, but they are all the same value, so 0 works.
I'm guessing it's just a bug with the DREL engine not recognizing the index provided. %a[Paintings] and/or %e[Rooms][%a[Paintings]] should just work.
Hope this helps and/or restores your will to live.
Brilliant. Many thanks for investing the time to look into this. Thank you on three fronts:
Many thanks again for taking the time - you have to love the PF Community!
Hi everyone! For future reference, this topic describes how to use DREL with repeatable, nested sections. Please note the use of %e versus %a: DREL for Repeatable Sections (prontoforms.com)
All the best,
@Calvin Hunter, that's a great solution you came up with - amazing! I can tell you that we have confirmed that this is a bug. Thanks for bringing this one to our attention.
@Stephen Morrison I have submitted a support ticket on your behalf so our Engineering team can get on this and get it all fixed up. In the meantime, however, it looks like you've got a great path forward.