Struggling with Parent/Child Start: Functions in Workflow

Okay, let’s do some troubleshooting. Does the following template produce a list of distinct (store #, store name) pairs?

<<Start: ORDERBY(FILTER("Previous Weeks Report",([_ROWNUMBER]=MAX(SELECT(Previous Weeks Report[_ROWNUMBER],AND(OR(([Company] = "Gonnella"),([Reference Company] = "Gonnella")),CONTAINS([_THISROW].[Store Lists To Include In Report],[List])))))),[Store #])>>
<<[Store #]>>: <<[Store Name]>>
<<END>>

no

only the Franklin Store

<<Start: Orderby(Select(Previous Weeks Report[Key],And(OR([Company]=”Gonnella",[Reference Company]=”Gonnella”),Contains([_ThisRow].[Store Lists To Include In Report],[List]))),[Today])>>

<<END<<

This does

Does each pair occur only once? If so, just use that instead.

Alright, now were making serious progress :slight_smile: I used that instead, but I encountered a smaller error.
The Cedarville store visits go under cedarville, but since there are 2 rows with cedarville, it shows up twice. How to I make each store only show up once, even if there are 2 rows with the pair in the table?

To answer your question, pairs can occur multiple times.

1 Like

I suspected as much. My original expression was an attempt to catch that. Thinking…

1 Like

Try this:

<<Start: ORDERBY(FILTER("Previous Weeks Report",AND(([_ROWNUMBER]= MAX(SELECT(Previous Weeks Report[_ROWNUMBER],(LIST([Store #],[Store Name])= LIST([_THISROW-1].[Store #],[_THISROW-1].[Store Name]))))),OR([Company]=”Gonnella",[Reference Company]=”Gonnella”),CONTAINS([_THISROW].[Store Lists To Include In Report],[List]))),[Today])>>
1 Like

That worked. THANKYOU SO MUCH!!!

1 Like