Groups in groups? Arrays in Arrays?

33 views
Skip to first unread message

Evan Adnams

unread,
Nov 16, 2020, 5:54:52 PM11/16/20
to Ultradox
I have a dataset that I'm trying to create a template from, involving 3 levels of data in a single row

  • Customer Info
    •  Customer Sites
      • Services on chosen Site.

I'm trying to generate a google docs template that will make: 
  • One document per Site
  • Within each document: list all the services assigned to that site
  • Fills in the customer information as well.

I think I need to use groups for this, but im struggling with getting the right information to list using 'foreach' in the templates.

The rows contain the same information for customer & site if its the same customer/site, so it looks like this (simplified)

Customer 1 | Site 1 | Service 1
Customer 1 | Site 1 | Service 2
Customer 1 | Site 1 | Service 3
Customer 1 | Site 2 | Service 1
Customer 1 | Site 2 | Service 2
Customer 1 | Site 2 | Service 3
Customer 2 | Site 1 | Service 1
Customer 2 | Site 1 | Service 2
Customer 2 | Site 1 | Service 3

Any ideas? I'm fairly sure Ultradox is the right tool for this, just unsure how to get that data properly parsed into documents.

Evan Adnams

unread,
Nov 16, 2020, 6:04:14 PM11/16/20
to Ultradox, Evan Adnams
First instinct is to concatenate the customer ID and the site ID in a new column, so I'm only dealing with the unique services.

Evan Adnams

unread,
Nov 16, 2020, 9:23:44 PM11/16/20
to Ultradox, Evan Adnams
Oops, I missed a layer.

Customer 1 | Site 1 | Service 1 | Activity 1
Customer 1 | Site 1 | Service 1 | Activity 2
Customer 1 | Site 1 | Service 1 | Activity 3
Customer 1 | Site 1 | Service 2 | Activity 1
Customer 1 | Site 1 | Service 2 | Activity 2
Customer 1 | Site 1 | Service 3 | Activity 1
Customer 1 | Site 2 | Service 1 | Activity 1
Customer 1 | Site 2 | Service 1 | Activity 2
Customer 1 | Site 2 | Service 1 | Activity 3
Customer 1 | Site 2 | Service 2 | Activity 1
Customer 1 | Site 2 | Service 2 | Activity 2
Customer 1 | Site 2 | Service 2 | Activity 3
Customer 1 | Site 2 | Service 3 | Activity 1
Customer 1 | Site 2 | Service 3 | Activity 2
Customer 2 | Site 1 | Service 1 | Activity 1
Customer 2 | Site 1 | Service 1 | Activity 2
Customer 2 | Site 1 | Service 1 | Activity 3
Customer 2 | Site 1 | Service 2 | Activity 1
Customer 2 | Site 1 | Service 2 | Activity 2
Customer 2 | Site 1 | Service 3 | Activity 1
Customer 2 | Site 1 | Service 3 | Activity 2
Customer 2 | Site 1 | Service 3 | Activity 3
Customer 2 | Site 1 | Service 3 | Activity 4

How on earth do I list these arrays?

Document per site, listing the customer info at the top, then the rest in a table.

Daniel Florey

unread,
Nov 17, 2020, 5:08:38 AM11/17/20
to Evan Adnams, Ultradox
I'm sure there is a way.... if you share the sheet and a mockup of the resulting doc with me it would be easier to give you the right answer.
Best,
Daniel

--
You received this message because you are subscribed to the Google Groups "Ultradox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ultradox+u...@floreysoft.net.
To view this discussion on the web, visit https://groups.google.com/a/floreysoft.net/d/msgid/ultradox/12400b7b-1977-41b2-81be-47197eb09b85n%40floreysoft.net.


--
Kind regards,

Daniel Florey




floreysoft GmbH
Telemannstraße 22, 20255 Hamburg, Germany
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg
HRB 106613 
Geschäftsführer: Daniel Florey
Message has been deleted

Steven Fautrat

unread,
Mar 22, 2023, 6:30:01 PM3/22/23
to Ultradox, Daniel Florey, Ultradox, Evan Adnams
Hello,
This conversation is already from some years ago, but i am today facing the same issue ! have you solved it ?
taking your example, i 've already created "groups" in ultradox (thta would group your customer for example), and now in my template i'd like to run throught every row of each group, but i can't make it, 've tried many ways.

${foreach groups group}

       group.name

        // what i'd like now : 
         ${foreach group.row row}
               row.site 
              $end


$end

but the syntax is not correct as such.
if you have the answer that would be really helpful,
thanks
steven

Joshua Bastian

unread,
Mar 23, 2023, 12:20:09 PM3/23/23
to Steven Fautrat, Ultradox, Daniel Florey, Evan Adnams
I'm unfamiliar with the ".row" operator.  Also if .row is an operator, can you also name it as the variable?
I'm also not clear what you are trying to output.  Are you trying to get every "site" that is contained in the group?
Have you tried something like this:
${foreach groups group}
       group.name
        // what I added: 
         ${foreach group.site s}
               s.value 
              $end
$end



--
Joshua Bastian, PE, CFEI
Mechanical Engineer

Answers from Ashes™ 

 

935 Pardee Street

Berkeley, CA 94710

800-726-5939 (headquarters)

619-243-4477 (mobile)

510-649-3099 (fax)

Joshua....@fcafire.com

www.FCAfire.com

 

Serving Clients Nationwide

 

Offices: Arizona - California - Idaho - Minnesota - Montana - Nevada - North Dakota - Oregon - South Dakota - Washington 

 

This e-mail is covered by the Electronic Communications Privacy Act, 18 U.S.C. Sec. 2510-2521, is confidential and may contain attorney-client materials and/or attorney work product, legally privileged and protected from disclosure.  This e-mail is intended only for the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.


This e-mail and any attachments may contain confidential and privileged information. It is intended for use only by the person to whom it is addressed. If you are not the intended recipient or have received this in error, please notify us immediately by return e-mail, delete this e-mail, including all attachments, without copying, distributing or disclosing same. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Any review, re-transmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. E-mail is not a secure means of communication. Please advise us if you would prefer to use an alternate form of communication. We accept no responsibility or liability for loss or damage arising from the receipt or use of this transmission.

Daniel Florey

unread,
Mar 23, 2023, 12:39:10 PM3/23/23
to Ultradox, joshua....@fcafire.com, Ultradox, Daniel Florey, ead...@gmail.com, steven....@gmail.com
Hi,
if you share the documents with me from drive I could have a look. Or we could do a quick teamviewer session to get this up and running.
Best,
Daniel

To unsubscribe from this group and stop receiving emails from it, send an email to ultradox+unsubscribe@floreysoft.net.

Steven Fautrat

unread,
Mar 24, 2023, 5:00:16 AM3/24/23
to Daniel Florey, Ultradox
Hi Daniel,

Thanks a lot for your answer and offer to have a look, that's very nice of you !

I imagine you'll quickly get the structure and the template, which are not complex at all.
I create groups within Ultradoc, and then want to loop within all the elements within each group in the google docs template.

could you help me making the loop within the groups ?

thanks a lot,
have a nice day,
steven 

Daniel Florey

unread,
Mar 24, 2023, 5:31:32 AM3/24/23
to Steven Fautrat, Daniel Florey, Ultradox
You have to iterate over the entries of each group in your case ( ${foreach groups.entries quiz} ... )
I've changed the template so that it works now.

Steven Fautrat

unread,
Mar 24, 2023, 5:39:51 AM3/24/23
to Daniel Florey, Daniel Florey, Ultradox
Hi Daniel,
That was quite easy for you it seems, thank you
I've tried many things for hours, i thought i tried this "group.entries" but apparently not, or the syntax was not correct.
anyway it works fine now, that's perfect ! 
thanks a lot for your help and support !!
Have a great day !
Steven
Reply all
Reply to author
Forward
0 new messages