I put together a text column where I was trying to group the name of a Menu Item along with its recipe items by using a Concatenate. I have an Ifs statement whereby I count the amount of related rows and then try and index the quantity and item name of each of those items but I obviously haven't got the right idea.
Below is the last part of my IFs statement for the sake of brevity. I have four parts before which are all similar, they just Count less Related Sides and Rolls
COUNT([Related Sides_and_Rolls])=5,
(CONCATENATE([Menu_Item],
" (",
INDEX(LIST([Related Sides_and_Rolls][Recipe_Qty]),1),
" ",
INDEX(LIST([Related Sides_and_Rolls][Recipe_Item_Real_name]),1),
" and " ,
INDEX(LIST([Related Sides_and_Rolls][Recipe_Qty]),2),
" ",,
INDEX(LIST([Related Sides_and_Rolls][Recipe_Item_Real_name]),2),
" and " ,
INDEX(LIST([Related Sides_and_Rolls][Recipe_Qty]),3),
" ",
INDEX(LIST([Related Sides_and_Rolls][Recipe_Item_Real_name]),3) ,
" and ",
INDEX(LIST([Related Sides_and_Rolls][Recipe_Qty]),4),
" ",
INDEX(LIST([Related Sides_and_Rolls][Recipe_Item_Real_name]),4)
")",
INDEX(LIST([Related Sides_and_Rolls][Recipe_Qty]),5),
" ",
INDEX(LIST([Related Sides_and_Rolls][Recipe_Item_Real_name]),5)
")")
)
It returned this big mess.
Steak,1,,,1,,,1,,,1,,,1,Regular,Cous,Cous,Salad,,,Regular,Goulash,,,Regular,Chips,,,Regular,Noodles,,,Pizza,Pie,and,,,and,,,and,,,
I wanted to return Steak (1 Regular Cous Cous Salad and 1 Regular Goulash and 1 Regular Chips and 1 Regular Noodles and 1 Pizza Pie)
Steak-Parent-[Menu_Items]
The rest are the Related Children, Sides and Rolls.
Please help?
Solved! Go to Solution.
There is a much simpler solution but requires adding additional supporting columns. Note that the "&" symbol is concatenate shortcut.
Add a column to your "Sides and Rolls" table, maybe named [Recipe Label], and assign this expression:
[Recipe_Qty] & " " & [Recipe_Item_Real_name]
In the table where you are gathering the Sides and Rolls, add an EnumList column, maybe named "All Sides and Rolls" and set its list separator to " and " (no quotes) and then set the App Formula to:
[Related Side and Rolls][Recipe Label]
Then in the column your posting about, change its formula to:
[Menu Item] & " (" & [All Side and Rolls] & ")"
I hope this help!
There is a much simpler solution but requires adding additional supporting columns. Note that the "&" symbol is concatenate shortcut.
Add a column to your "Sides and Rolls" table, maybe named [Recipe Label], and assign this expression:
[Recipe_Qty] & " " & [Recipe_Item_Real_name]
In the table where you are gathering the Sides and Rolls, add an EnumList column, maybe named "All Sides and Rolls" and set its list separator to " and " (no quotes) and then set the App Formula to:
[Related Side and Rolls][Recipe Label]
Then in the column your posting about, change its formula to:
[Menu Item] & " (" & [All Side and Rolls] & ")"
I hope this help!
User | Count |
---|---|
37 | |
30 | |
29 | |
22 | |
18 |