by-exp-dsnd modifier

The -by-exp-dsnd modifier is followed by an attribute name that references a MultiValue attribute to be used individually as sort keys in descending order.

The by-exp-dsnd modifier is also used to sort attributes that may contain more than one value. When the by modifier is used on a MultiValue attribute, it only sorts proper position, and the item-ID displays with each value. Further, each item-ID only displays once, assuming that its display is not suppressed.

When the by-exp-dsnd modifier is used, it explodes each value in the attribute and treats each value as though it were a separate item. Each value sorts into its proper position, and the item-ID displays with each value. In other words, the number of times an item-ID displays on a report coincides to the number of values in the exploded attribute.

The explosion limiter specifies that output only occurs on data elements meeting the print limiting criteria. This can be used with any command that lists or selects items, such as list, sort, or select.

Syntax

by-exp-dsnd attr.name{"explosion limiter"}
Note: If by-exp-dsnd is provided with a command that does not naturally sort (such as the list command), the command is changed to its sorting counterpart (for example, list becomes sort, select becomes sselect, and so on).

Example(s)

list invoices ’0001’ quantity.ordered

The above sentence results in the following:

0001   1
 
       6
 
       3

list invoices ’0001’ by-exp-dsnd quantity.ordered

The above sentence results in the following:

0001   6

0001   3

0001   1