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
Solved! Go to Solution.
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>>
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>>
Thanks a million @Steve, you nailed it as always. I honestly would never of thought of dropping the [ItemID#].
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.
@Steve - I am facing similar issue. I want distinct records from a column which is not the key column of that table, infact its a virtual column.
SELECT works only with key column but my purpose is not solved as I want distinct records of another column and If I use other column in the SELECT, it doesn't work.
Just wondering how is this working in that case?
Solved: Re: Template: Start expression + Select unique val... - Google Cloud Community
User | Count |
---|---|
41 | |
31 | |
31 | |
16 | |
14 |