Asking for help including text in repeat output

What’s going on Shortcuts enthusiasts.

I was making a shortcut for an online class that requires a bunch on discussion board posts and replies. I got the dang thing mostly working but, I’m stuck on a repeating issue.

I’d like the output be formatted as…
Week 1 Discussion 1
Week 1 Discussion 1 Reply 1
Week 1 Discussion 1 Reply 2
Week 1 Discussion 1 Reply 3
Week 1 Discussion 2
Week 1 Discussion 2 Reply 1
Week 1 Discussion 2 Reply 2
Week 1 Discussion 2 Reply 3
…and so on for the eight week class.

The loop I’ve made drops off the Week X Discussion X portion and only outputs the lines with the replies.

I’ve tried everything I can think of but I’m lost. Does anyone have any idea what I need to do to get the output formatted the way I’d like.

Thanks so much for guidance anyone is willing to give.

Here you go.

This tweak using a Text action to reintroduce the missing text I think works.

You can rationalise it further as the original text isn’t used in the current position, but I left it as, is as it is The order in which you break things down; but text wise it isn’t quite the order in how things get built up.

Hope that helps.

Thanks! It does help tremendously.

If I understand correctly, you added another text section to include the original repeat and the repeat result after the replies text is built. I wrongly assumed Shortcuts would combine the data together but it’s actually linear. The result is built from all the steps and essentially, in this example, you added another step in that chain to merge the original and repeat text together. I think I get it.

Thanks once again @sylumer for helping!