Expand two lists per row

I have a scenario in which a set of items are being manufactured (itemCount) for a given project (Name). Each item takes 17 working days to complete (which can be set in the text box above left).

Based on the start date value, a list of startDates and endDates (working days) is generated for each of the individual items.
image

image

I would then like to “explode” those lists into individual rows, as shown below.

image

I am able do generate the start date column with the formula below, however, the way I understand ForEach(), it must parse all values sequentially, preventing me from simply adding another statement for the endDate, such as this:

image

image

As for solutions, I’m open to an entirely different method if someone has a suggestion (although it should maintain the simplistic Name, itemCount and start date input fields. Thanks in advance.

Hey @Nate_Eikelberg - If I could offer an alternative approach it may simplify the management.

  1. Break the Start/End date runs (i’ll them Manufacturing Runs) into a separate related table
  2. In the Manufacturing Run table add a “Working Days to Complete” column and it’s default value will be your working days to complete text box.
  3. The End Date of the run will be the Start Date + the rows Working Days to Complete value
  4. When you want to add a new run, add a new row to Manufacturing Runs. Set the project and start date and you’re all set.

It would look like this

And here’s a doc with a quick POC

Hi @Ryan_Hubbard1 - thanks for the response. I may have oversimplified my scenario a bit for ease of conveying the issue. In a real world scenario a typical project will be 75-150 items, hence my goal of adding only one line per project and exploding that versus the other way around.

Of course dates will need to be pushed (it’s manufacturing after all) so the plan would be a simple “offset by 𝑛 working days” button that applies the adjustment to the checked rows.

This tool will only be used temporarily while getting a comprehensive ERP system set up (and is simplifying—in part—the output of an incredibly complex spreadsheet solution).

TLDR

I effectively need of find a way to go from this
image

to this
image

@Nate_Eikelberg if that format is what works best for you then I believe this will get the job done. Assuming the start & end date pair are both in the Nth position you can use the Sequence function & a forEach to basically create a for(i=1, i=list length, i++) loop for your start/end date pairs and access the pairs using the Nth function.

.

If you want to play with it it’ on the explode button on this doc

Does that get you what you’re looking for?

1 Like

Yes @Ryan_Hubbard1 , that seems to be what I need (and coincidently is the same solution I was working on concurrently – glad to see I was on the right track)! I was going going about it in a less straight forward manner though and creating an array for each line [module, startDate, endDate] and then attempting to iterate through using Sequence(1, itemCount) to indicate the array value and another Sequence(1,3) as to indicate the position. Your solution is much more straightforward. Thanks again for the time and energy put into it.

1 Like

Glad I could help! Cheers :clinking_glasses:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.