john.edw_gmail.com | 2023-11-01 23:42:21 UTC | #1 How can I get the following output linking items with the appropriate group based on the fieldname? ``` group1 name item1stuff group2 name item2 stuff ``` This is close but lists all item-x fields under each group. Unknown number of group|item pairs per tid. ``` <$list filter="[fields[]prefix[group]]" variable="thisfield"> <$view field=<>/>
<$list filter="[fields[]prefix[item]]" variable="thisitem"> <$view field=<>/>
``` ![image|690x247, 75%](upload://q1lhmSVKzBxNBrzjFXSwkWNic16.png) ------------------------- EricShulman | 2023-11-02 03:14:30 UTC | #2 Try this: ``` <$list filter="[fields[]prefix[group]]" variable="thisgroup"> <$view field=<>/>
<$let itemprefix={{{ [[item-]] [split[-]nth[2]] +[join[]] }}}> <$list filter="[fields[]prefix]" variable="thisitem">   <$view field=<>/>
``` Notes: * Inside the outer `$list` widget, we construct the desired "item-#" prefix by using a "filtered transclusion" to join together the literal text "item-" and the number for the current group, which we extract from the `thisgroup` variable using `split[-]` and `nth[2]` filter operators. * We can then use the constructed prefix in the second `$list` widget's filter. * I added an ` ` (a full em-space HTML character) to provide indentation for the item output enjoy, -e -------------------------