I will apologize in advance for my brain power has been squeezed a bit by my newborn child. I will first mention that I have spent some time trying to sort this out on my own (using the help, searching the forum, blah blah). I am not asking for someone to do this for just point me in the right direction please…
The nitty gritty: I have some fields:
item1
category1
item2
category2
item3
category3
item4
category4
The category fields roll up into a @unique(list1)
Should I/Can I use @transform to display the list of unique categories one by one followed by the list of items which have
the coressponding category field selected?
ie
item1 = “red”
category 1 = “color”
item2 = “dog”
category2 = “pet”
item3 = “blue”
category3 = “color”
item4 = “happy”
category4 = “emotion”
should display as:
color
red
blue
pet
dog
emotion
happy
Any help steering me in the most efficient direction is greatly appreciated.
Thank You both so much. I was on the right track but not getting over the hump.
Andre I wish my brain worked like yours :). The big thing messing me up was the
formatting I would still be lost without the @trim. Anyways I have added some
basic formatting if anyone else is interested. The formula with the formatting
I ended up with is:
I’m not sure transform would be the best approach. You might want to use @for loops to examine each element. You can get your unique list of categories, and stick that in a unique_category list. Then make a list of cateogries and a list of items. Each positional element in the categories and items list should match up. Your outer for loop will loop through the unique_categories, your inner for loop will loop through each element in the category list, checking for a match against the currently indexed unique_category. I guess you can then print out the category header, then the items that match.
That’s my thought after a few minutes of thinking about it, however I’m sure there’s a more elegant solution