SLOTS

The SLOTS function takes a list of items and groups them into slots.

Details

It also accepts a group of lists, returning, in this case, a group with slots in each of its entries.

Syntax

SLOTS(items, table, [multiple])

Table syntax

Examples

Example 1

If:

  • items = [p1, p2, p3, p4, p5]

And table is:

SLOTS(items, table) will return:

slot1: [p1]
slot2: [p2]
slot3: [p4]

SLOTS(items, table, true) will return:

slot1: [p1, p5]
slot2: [p2, p3]
slot3: [p4]

Example 2

If:

  • items = [p1, p2, p5, p3, p4, p5]

and table is:

SLOTS(items, table, true) will return:

slot1: [p5, p1]
slot2: [p2, p3]
slot3: [p4]

Note p5 has a higher priority because it appears twice in the list.

Example 3

If:

  • items = {group1:[p1, p2, p3, p4], group2:[p5, p6, p7, p8]}

and table is:

SLOTS(items, table, true) will return:

group1:
    slot1: [p1]
    slot2: [p2, p3]
    slot3: [p4]
    
group2:
    slot1: [p5]
    slot2: [p6]
    slot3: [p6, p7, p8]

Last updated