Select unique column values in a start expression and get reference details from that column value

Hi,

I have a template built and I’m struggling with syntax.
I have a orders table and I want to get a list of all of the unique items a customer ordered and then display details of those items from the product table.
In the below it doesn’t recognise [ItemID#].[Name].
I’m assuming you can’t use a select like that in a start function? If not how do I get the unique values?

<<Start: Select(Orders[ItemID#], [Customer] = [_THISROW].[Customer], TRUE)>>
<<[ItemID#].[Name]>>
<<[ItemID#].[Description]>>
<<END>>

Any help would be much appreciated.
Cathal

Is Item ID # the key of Orders table?

No there is a [OrderID#] that’s the key to that table. [ItemID#] is a reference to the product table.

Anyone have any insight on this one? It must be possible somehow.

Instead of this:

<<Start: Select(Orders[ItemID#], [Customer] = [_THISROW].[Customer], TRUE)>>
<<[ItemID#].[Name]>>
<<[ItemID#].[Description]>>
<<END>>

Try this:

<<Start: Select(Orders[ItemID#], [Customer] = [_THISROW].[Customer], TRUE)>>
<<[Name]>>
<<[Description]>>
<<END>>
1 Like

Thanks a million @Steve, you nailed it as always. I honestly would never of thought of dropping the [ItemID#].

1 Like

Within a pair of <<Start>> and <<End>> tags, direct column references (e.g., [Name]) refer to the row provided by the <<Start>> expression. Your <<Start>> expression provides a list of ItemID# values, so [Name] would refer to the Name column value of the row identified by the current ItemID# value.

1 Like